Frank Heckenbach a écrit :
Maurice Lombardi wrote:
But again, that wasn't my point. If you have a (say, TP style) object that declares a destructor "Done", in none of the cases it will be called automatically:
If the object is on the stack and leaves scope, and you don't call the destructor manually ("Foo.Done").
If the object is dynamic and you dispose of it simply with "Dispose (Foo)" rather than "Dispose (Foo, Done)".
If the object is dynamic and its memory is reclaimed, e.g., by the Boehm GC (which doesn't know about objects at all, just memory blocks).
In contrast, in C++ in the first two cases the destructor is called automatically
No plan to implement this in gpc, with an additional compiler option if you do not like to make this behavior the default for gpc ?
Many thanks for the clarifications anyway
Maurice