Both Free Pascal and Delphi support the old Turbo Pascal object model that is defined using txx = object(tparent)Originally Posted by chronozphere
end;
objects are auto-freed (they are static objects, record like for allocation purposes) but not auto-destructed. They don't have an official destructor in the first place.
That's the whole point. The dyn array contents are not freed, but finalized. For automated types ( e.g. interface/strings/dyn arrays/variants) this means decreasing ref count, and can _lead_ deallocate if necessary.AFAIK, It's all as follows:
Strings and records are automaticly freed.
Pointers (pointing to data) and Objects are NOT automaticly freed.
I don't know for sure about interfaces, but i guess their refcount wil decrement automaticly when they are freed/finalized.
This is exactly the same as for e.g. local variables.
Bookmarks