Re: Proper Way to "Unload" a Loaded Nib w/Bindings [Solved, Maybe]
Re: Proper Way to "Unload" a Loaded Nib w/Bindings [Solved, Maybe]
- Subject: Re: Proper Way to "Unload" a Loaded Nib w/Bindings [Solved, Maybe]
- From: Keary Suska <email@hidden>
- Date: Tue, 27 Mar 2007 19:39:16 -0600
- Thread-topic: Proper Way to "Unload" a Loaded Nib w/Bindings [Solved, Maybe]
on 3/27/07 4:58 PM, email@hidden purportedly said:
> "programmatically-created outlets"?
Sounds weird, but there are Cocoa classes for handling outlets, ostensibly
used by NSNib to establish connections. Theoretically they could be used to
dynamically establish connections, say, between two separate nibs. Or it
would be just as easy to make those connections in code.
> All it is saying is that once you release the top-level objects of a
> nib any IBOutlets you have in the nibs owner are no longer valid since
> the objects they reference in theory no longer exist. So setting those
> to nil can prevent attempts to use now stale pointers. Additionally if
> you have setters for your outlets that retain what they get passed
> then you will need to make sure to use the setter to set them to nil
> (trigger the retained object to be released).
Yes, other than what I mention above, only the nib owner would have "outlet"
connections and may not be released when the top level objects are, so it
makes sense there. But it's not specific, and uses the term "outlet" when in
fact it would mean *any* reference to a nib object. After all, any object in
the app could have a reference if it can talk to the nib owner, and not just
outlets proper. I try to err on the side of caution, since assumptions could
cause days of debugging.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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