how do you explicitly "DESTROY" objects in java? I know about the garbage collection doing it on its own but i'm looking for something more like in vb.net, such as:
myObject = nothing
Printable View
how do you explicitly "DESTROY" objects in java? I know about the garbage collection doing it on its own but i'm looking for something more like in vb.net, such as:
myObject = nothing
Best I can think of is using the null keyword:
myObject = null;
You don't.. It's automatic and happens periodically. You can set them to null like sqlall said, to maybe prevent errors or already have the object initialized for further use.
thanks.
Yeah just dangle the ref and the garbage collector should reclaim the allocated memory. :afrog: