In the Memory Management Programming Guide for Cocoa Apple talks about Top-Level Objects. They say, that I need an Outlet for each of them.
If there are any top-level objects you do not store in outlets, however, you must retain either the array returned by the loadNibNamed:owner:options: method or the objects inside the array to prevent those objects from being released prematurely.
So what exactly do they mean with "top-level object"? I would say they talk about the root view and window. What else? And is this hint just for cases in which I would want to load their nib manually? Or does it apply for any nib and any case?
Top-level objects are objects that appear in the main nib window in Interface Builder, other than File’s Owner and Application.
Yes, this is about the cases where you load the Nib manually, else you wouldn't have called loadNibNamed:owner:options:.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With