[fpc-pascal] Using Supports() I got an AV... bug?

Vojtěch Čihák vojtech.cihak at atlas.cz
Sun Mar 11 15:17:21 CET 2018

Yes, TBar is TInterfacedObject and is reference counted therefore Free is not needed.
Just comment the line //Bar.Free; compile with -gh and you will see no memory leak.
> Od: "Marcos Douglas B. Santos" <md at delfire.net>
> Komu: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Datum: 11.03.2018 14:57
> Předmět: Re: [fpc-pascal] Using Supports() I got an AV... bug?
On Sun, Mar 11, 2018 at 10:52 AM, Vojtěch Čihák <vojtech.cihak at atlas.cz> wrote:
 > Hi,
 > Bar shoud be released by Interface, no need to call Free.
 I'm sorry, but `Bar` was defined as `Bar: TBar` so, it's a class not
 an interface.
 Marcos Douglas
 fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
 http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal <http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180311/f61718a1/attachment.html>

More information about the fpc-pascal mailing list