Class's destructor

dubej00

New Member
Hello,

We are using OO since few month is our OpenEdge project. We recently solved a problem with a class who contains a buffer handle who was not released in the destructor (this was in link with de "-rereadnolock" parameter).

Now, I have those questions :
What is it needed to do in a destructor of a class?
A delete of handle and object? An empty of temp-table? Anything else?
Is it useless traitment?
Is the OpenEdge's garbage collector is enought reliable to omit this?

Thanks!
 
IMO you should never rely on garbage collection. If you create something, you should also destroy it.
 
Note also that the GC, which is only in the latest versions, is on *objects*, not other dynamic things like buffers. You can clean up some things with appropriate use of widget-pools, but the best advice is to do your own housekeeping.
 
Back
Top