Yes, TBar is TInterfacedObject and is reference counted therefore Free is not 
Just comment the line //Bar.Free; compile with -gh and you will see no memory 
Od: "Marcos Douglas B. Santos" <>
Komu: FPC-Pascal users discussions <>
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 <> 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 maillist  -

Reply via email to