Khimenko Victor wrote:
[...] In case of GPC you can have GC-enabled new (with GC's malloc) or non GC-enabled new bot not both :-/ You can not just use gc_alloc(sizeof(record)) since if record has embedded strings or files you need to initialize it first [...]
That's not a problem since the GC-enabled malloc() can hook into GPC's run-time library where it is used instead of the usual malloc(). Initialization is done afterwards.
(and if record has virtual part then new can allocate less then gc_alloc(sizeof(record)) -- or is this Pascal's feature not implemented yet?).
It's not implemented yet, but if it were, it would not be a problem either.
Peter