FROM : Shawn Erickson
DATE : Tue May 20 20:13:48 2008
On Tue, May 20, 2008 at 8:45 AM, Cathy Shive <<email_removed>> wrote:
> Hi,
>
> I'm hoping that one of the Cocoa engineers out there can answer a question
> about NSViewController for me.
>
> In the documentation, it states that the view controller will handle memory
> management for the objects in its nib file. Does this only apply to nib
> files that are loaded by NSViewController behind the scenes during the
> "loadNib" method? Lets say that you pass in nil for the arguments for
> nibName and nibBundle in the initializer, and then load a nib using
> NSBundle's 'loadNibNamed:owner' method later on (setting the owner to self),
> will the memory management magic still happen?
Likely not since it wouldn't have access to the top level object array.
Also I believe it is preferred to use NSNib for loading nibs since it
gives you more capabilities and is IMHO easier to use.
-Shawn
DATE : Tue May 20 20:13:48 2008
On Tue, May 20, 2008 at 8:45 AM, Cathy Shive <<email_removed>> wrote:
> Hi,
>
> I'm hoping that one of the Cocoa engineers out there can answer a question
> about NSViewController for me.
>
> In the documentation, it states that the view controller will handle memory
> management for the objects in its nib file. Does this only apply to nib
> files that are loaded by NSViewController behind the scenes during the
> "loadNib" method? Lets say that you pass in nil for the arguments for
> nibName and nibBundle in the initializer, and then load a nib using
> NSBundle's 'loadNibNamed:owner' method later on (setting the owner to self),
> will the memory management magic still happen?
Likely not since it wouldn't have access to the top level object array.
Also I believe it is preferred to use NSNib for loading nibs since it
gives you more capabilities and is IMHO easier to use.
-Shawn
| Related mails | Author | Date |
|---|---|---|
| Cathy Shive | May 20, 17:45 | |
| Shawn Erickson | May 20, 20:13 |






Cocoa mail archive

