around this issue Unless the interface is downgraded to IUnknown via QueryInterface() then there is some potential for this to be an issue for you as it may not have respected the COM rules. The default IComparer and IEqualityComparer for tkInterface simply compares the pointer values as four byte integers (so, there is on QueryInterface done to get back to the aggregate). Look for tkInterface in Generics.Defaults to see.
Delphi 2009 - Can an Interface Property Cause a Memory Leak?
wish help you to fix your issue The with preserved word in Pascal/Delphi is only used for easily accessing the members of records or objects/classes (i.e. in order not to mention the record's/object's/class's name). It's very different from the C# with that relates to garbage collection. It has existed in the Pascal language since the day records were born, to simplify code calling to many data members (back then simply called "fields"). To summarize, with has nothing to do with garbage collection, release of memory or destruction of object instances. Objects that are constructed at the with header could just have been initialized in a separate code line before, it's the same.