[fpc-pascal] Is this a reference counting bug?

Florian Klaempfl florian at freepascal.org
Sun May 2 09:50:47 CEST 2010

Bihar Anwar schrieb:
> I found that the last element of a dynamic array starts with
> reference count = 2 in FPC, but in Delphi is 1. Is this an FPC bug,
> or FPC implements reference counting differ from Delphi?

FPC and Delphi handle code generation for ref. counted types slightly
different, so there might be cases where the ref. counter differs. As
long as there is no memory leak when the vars are properly used, we
don't consider it as a bug.

More information about the fpc-pascal mailing list