James Bott wrote:Antonio,
Gee, Enrico and I just had a discussion about not setting objects to nil, but instead calling the End() method. Shouldn't that be done here too? I note that there are functions like Destroy() and DelItems() in the End() method that if not called might cause a memory leak.
James
Its a technical reason mainly. From an object oriented point of view, calling End() should be enough, but we need to force the garbage collector to work as that does the real inner cleaning, and it gets invoked assigning it to nil. We can not make Self := nil from within a method.
We could implement a Destructor method that automatically gets called and this would avoid the assignment, but as Harbour and xHarbour did not had them since the beginning and implementations were not identical on both, we did not used them in FWH. But now we could use it