This is probably a noob question, but its driving me crazy. I am developing an application that loads a subview inside the main view programatically (not in the sample code). The subview is an IEAudioChannelViewController instance, but the application crashes when i try to release the object as follows:
IEAudioChannelViewController *audiochannel = (IEAudioChannelViewController *) [sb instantiateViewControllerWithIdentifier:@"AudioChannel"];
NSLog(@"Audio channel: %@", audiochannel);
[audiochannel release]; <-- here the crash!
If i remove the release line it works,
Any idea why this happens ? (Automatic Reference counting is disabled)
You are releasing the object that is autoreleased, please remove the
since the instantiateViewControllerWithIdentifier returns an auto released object
The rules is always the same, if you dont alloc, new, retain or copy an object then dont call release on it