Note that there are some explanatory texts on larger screens.

plurals
  1. USThomas Børlum
    primarykey
    data
    text
    plurals
    1. CO_An update for anyone having the same problem._ There are two solutions to the problem. 1# Always either make properties for with `retain` every outlet. And set them to `nil` in `-viewDidUnload:` and release the ivar in `-dealloc:`. If you set the property to `assign` you are going to have to make sure the outlet is loaded whenever you want to use it! #2 Or, as I do, and don't make properties for outlets unless you really need them. Then in `-viewDidUnload:` do `[myOutlet release], myOutlet = nil;` and in `-dealloc:` do `[myOutlet release]`. In the end this will be less code.
      singulars
    2. COAdding a property with `assign` does remove the leak. Thanks! This does, on the other hand not explain why the outlet is released correctly when I actually use it, e.g. like in the last code above. This would suggest that UINibLoading only releases its' retained outlets the instant they are retained by something else! How convoluted! I haven't gotten around to read the whole article you linked to, but you seem to have hit the nail right on the head! How cruel of apple to force me to write properties when I don't want to. :.(
      singulars
    3. COYes it does, but when the `toolbarItems` property is released by `[super dealloc]`, `release:` called for each of the arrays children. In any case this does not explain why it is only when the `IBOutlet` is unused the problem occurs.
      singulars
 

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