
10 Dec
2009
10 Dec
'09
2:29 p.m.
Achilleas Margaritis wrote:
While the above example doesn't use reference counting, it can be combined with reference counting to solve the issue of cyclic references: objects that their reference count reaches 0 are deleted normally; objects with cycles remain in memory until the oldest pointer to them goes out of scope.
What if there are two objects A and B, and A's destructor references B while B's destructor references A?