On 15-11-2010 14:59, Michael Van Canneyt wrote:

You must finalize, because ref. counting of interfaces etc. need to be taken care of. Interfaces may live outside the FPC memory space, and are therefor
not accessible to the GC. If you want to let the GC collector handle all
that, you're in essence copying what the the destructor does, and that
seems like a wrong approach.

Michael.
Indeed. Therefore I want to adapt the rtl at the earliest point possible where a pointer to object is available to mark for finalization. It seems this is in Tobject.InitInstance. But afaik this will work with the code provided. See example. For AnsiStrings it seems sufficient to take into account the extra ptrint that registers the size of an entity.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to