L
Lieven De Foor
Guest
As Kim and Tim said, there's nothing wrong with both methods, who are completely equivalent by the way. It is the caller of those methods that keeps a reference to the returned object, causing the leak. Either way, I would never explicitly delete objects. Just make sure any variable holding a reference is set to ? (or goes out of scope) to have the GC pick up the object for deletion...
Continue reading...
Continue reading...