5
votes
Vote UpVote

Weak interface references

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 ...
Favorite? Off-Topic? Andreas Hausladen @ 2009-06-13 13:10

Statistics

Visits: 733
Votes: 5
Favorites: 3
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Aleksey Timohin
jamiei
PRice
skamradt
Tier777
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)