Andy's Blog – Interfaces in Delphi are reference counted (unless you disable this behavior) and that is used to manage the life cycle of objects. This works as long as the objects behind the interfaces do not reference each other via interfaces. In that case none of the objects will ever be released because the reference counter never becomes zero and you have a memory leak. There are some solutions for this. The first is to write an extra function than unlinks the two objects and the second is to use pointers instead of interfaces. The first requires you to know that the object references another ...
Visits by Source
Users who voted for this posting