G
Guest
Hi,
When I use same variable for a new created object, then whill the old one
destroyed by garbage collection, or do I first have to set it to null ?
eg:
SomeObject o = new SomeObject();
// and a while later:
o = new SomeObject();
or should I do:
o = null; // or call destructor? how?
o = new SomeObject();
When I use same variable for a new created object, then whill the old one
destroyed by garbage collection, or do I first have to set it to null ?
eg:
SomeObject o = new SomeObject();
// and a while later:
o = new SomeObject();
or should I do:
o = null; // or call destructor? how?
o = new SomeObject();