Iphone – Which “Top-Level Objects” is Apple talking about in the Memory Management Programming Guide

iphonenibuikitxib

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?

Best Answer

Top-level objects are objects that appear in the main nib window in Interface Builder, other than File’s Owner and Application.

Related Topic