Instead of setting the object to nothing like in VB6, use the ReleaseComObject to release the memory:

System.Runtime.InteropServices.Marshal.ReleaseComObject(['object'])