You set the reference to the object to null. Then the garbage collector
will find that the object isn't referenced to anything and clear it.
myObject = null is one way to do it. But for temporary objects that will
fall out of scope you don't need to do even that.
Some classes have a Close() method. And if it has, you should use it
before it falls out of scope. Usually complex classes using resources
that will clean up itself in the Close method.
--
Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/