Found leaks when adding IBOutlets specially UIimageview in interface builder
When i am adding IBOutlet UIImage *name and connect it with interface builder, the开发者_开发技巧n it gives me Leaks. How can i remove this leaks.?
IBOutlet UIImageView * growbar;
@property (nonatomic, retain) UIImageView * growbar;
@synthesize growbar;
After that, I will connect it to interface builder by drpping UIImageview on view and connect..
This is when i was adding iboutlet.
Are you clearing your IBOutlets in your viewDidUnload?
- (void)viewDidUnload {
[super viewDidUnload];
[self setGrowbar:nil];
}
If your view is unloaded for any reason (probably low memory) then you will leak your IBOutlet objects unless you release them specifically in viewDidUnload.
Is the view controller owning these outlets actually released?
You can check by either placing log/breakpoint in dealloc, or seeing the VC as a leak himself in Instruments.
Now I am not retain IBoutlet just release in deaaloc and not recieve any warning
精彩评论