[Lazarus] Log4D weirdness

Marco van de Voort marcov at stack.nl
Wed Dec 31 21:51:51 CET 2014


On Sun, Dec 28, 2014 at 04:03:07AM +0100, Hans-Peter Diettrich wrote:
> > Like many cases, Delphi does not specify this behaviour, and in general for
> > Delphi not much is known what of the implementation is intended, or what is
> > coincidence.  This is aggrevated by the fact that too much Delphi code
> > messing with interface refcounting seems to be created with trial and error.
> Also strings had (have?) problems with refcounting of *const* parameters 
> in Delphi. As a first try I remove the "const", in case of unexpected 
> trouble.

Afaik the problem is that "const" as used in classic delphi is not very
portable. In theory it is specified as immutable (can't be modified), but
widely abused to mean "by reference". This happens to be the case for x86
ABIs, but this is not portable (which why FPC introduced constref)




More information about the Lazarus mailing list