Re: Appropriate dealloc and finalize actions
Re: Appropriate dealloc and finalize actions
- Subject: Re: Appropriate dealloc and finalize actions
- From: Greg Guerin <email@hidden>
- Date: Sun, 11 Oct 2009 22:40:30 -0700
Jens Alfke wrote:
It's not so much making an object responsible for another object's
internals, as simply managing a relation from that other object. In
other words, I'm the one who told the window to point its delegate
property to me, so it's OK for me to tell it to point it to nil
when I go away.
I agree with the intent: managing the relationship. I also agree
with the stated mechanism for breaking the relationship: telling the
other object to point to nil (although I would say "before I go
away", not "when I go away").
I think the distinction is in how the relationship is managed.
You've described breaking the relationship by telling the recipient
to change its delegate to nil. I'm not sure that's the same
relationship of the OP's 'connection' property. It's a gray area,
mainly because it's not clear that the 'connection' relationship is
always A->B->A. I saw nothing to suggest that A->B, C->B, D->B was
impossible, in which case there are more difficulties than just a
retain cycle.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden