tinterfacedobject

why aren't descendants of TInterfacedObject garbage collected?

i have a class based on TInterfacedObject. i add it to TTreeNode's Data property. TFacilityTreeItem=class(TInterfacedObject) private m_guidItem:TGUID; m_SomeOtherNode:TTreeNode; public end; i create many instances of this object & had assumed that because they're reference counted, i shouldn't need to Free them. that'd be handy....

Reference-counting for objects

Hi. In my code I use a small data-storing class, which is created in different places. To avoid memory leaks and simplify things, I want to use reference counting, so I did type TFileInfo = class (TInterfacedObject, IInterface) and removed all my manual calls to TFileInfo.Free. Unfortunately Delphi reported a lot of memory leaks. Sear...