Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You DO need to release it. See</p> <p>"As it rebuilds the object hierarchy, however, UIKit reestablishes connections between the objects using the setValue:forKey: method, which uses the available setter method or retains the object by default if no setter method is available." in <a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/chapter_3_section_4.html#//apple_ref/doc/uid/10000051i-CH4-SW18" rel="nofollow noreferrer">Nib Object Retention</a> </p> <p>In other words, because you haven't specified these entries as @property (which implicitly declares a setter), or provided a setter directly, there is no available setter method, and the final part of this paragraph applies - the object is retained by default.</p> <p>You should, in your dealloc() method, set all IBOutlets to nil using</p> <pre><code>self.outletName = nil; </code></pre> <p>If no setter is defined, then setValue will autorelease the old value (make sure you have an NSAutoreleasePool if running in a thread). If a setter is defined, it will perform whatever behaviour you defined. Either way, the set to nil will do exactly the right thing, and ensure you get no memory leaks. Do NOT do this</p> <pre><code>outletName = nil; </code></pre> <p>This will directly set the member variable, and bypass calling setValue.</p> <p>See the documentation of NSObject setValue:forKey for more details.</p> <p>Running the Performance Tool (Leaks) will not show a leak, but you can verify that there is actually a leak by looking at the current running total of allocated memory.</p> <p>cf <a href="http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/" rel="nofollow noreferrer">The Airsource - Memory Management and NIBs</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload