Sven Barth schrieb:
* No name resolution (function aliases) of conflicting interfaces
Ehhh... the following code compiles with 2.4.2 and even 2.4.0:
Typical FUD tactics: mix something people know being true with something
wrong and they believe you the wrong statement.
var
t: TMyInterfacedObject;
i: IMyInterface;
begin
t := TMyInterfacedObject.Create;
try
i := t;
t.Foo;
i.Foo;
finally
t.Free;
end;
end.
==== source end ====
Output is:
==== output begin ====
Foo
Bar
An unhandled exception occurred at $08056B71 :
EInvalidPointer : Invalid pointer operation
$08056B71
==== output end ====
(I don't know currently where exactly that EInvalidPointer comes
from.... even a "t.AddRef" doesn't solve this...)
Releasing TInterfacedObject descendants by Free is a bad idea ;) It
destroys the instance without checking if there are still queried
interfaces.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal