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.
Actually, I am *calling* the destructor in the finalizer, not copying
it. AFAIK this should take care of it.
Regarding refcounted strings: the way it is implemented here doesn't
carry any prize for beauty, but it seems to work alright.
As Marco stated, and is provided, there is a need for a callback and
that is exactly what Boehm has provided for.
I am *very* unsure about the correct implementation, though. Critique is
highly appreciated and necessary before I attempt to create a full
GC'ing (my rather ambitious goal) FPC version.
Regards,
Thaddy
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel