On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco <flavio.etru...@gmail.com> wrote: > >> procedure addintf(const aintf: IUnknown); >> (...) >> addintf(TInterfacedObject.Create); >> (...) > > It's a pity, but I don't know whether it's fixable (or if needs to be > "fixed") in the compiler.
Works in Delphi 7 with FastMM4. > The TInterfacedObject has RefCount = 0 after construction, so you > should always to assign it to a variable. > In a sense a RefCounted object only exists while someone has a > reference to it, so in that case the object non-existant ;-) Correct. I am using an interface reference -- in the indexOf() method in my sample -- before its "definitive persistence" as an intflist member, and without a "real" variable that holds the instance alive because of the const parameter. You are suggesting that this unlikely coincidente which causes a sigsegv should be the programmer's responsibility. No thanks, I much more prefer the Delphi compatibility =) Joao Morais _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal