1
votes

i'm a little confused about memory managment with IB objects, here what i've done:

  • i've a navigation controller, i push other view with

    ...[[[viewController alloc]init]autorelease]...

  • I connect EACH element of Interface Builder to a IBOutlet so defined:

    @property(nonatomic, retain) IBOutlet *object

    and in .m file : @synthesize object = _object

  • Then in viewDidUnload: self.object = nil;

  • Finally in dealloc method: [_object release];

Is this a right way to manage Interface Builder object's memory?

1

1 Answers

1
votes

Yes, you did everything correct.

Just one thing - you don't have to make outlets for all your UI elements, you can create them only for those you need to access in code.