[fpc-devel] Boehm garbage collector for freepascal
Thaddy
thaddy at thaddy.com
Mon Nov 15 16:17:14 CET 2010
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
More information about the fpc-devel
mailing list