问题
I am using the three20 library (not sure if this is the cause) and am getting a leak when going back and forth between two views of a navigation controller.
More details of one of the leaks:
The only think I can think of is that I show the toolbar when it pushes the second view onto the stack:
/**
* View is going to appear
*
* @version $Revision: 0.1
*/
- (void) viewWillAppear:(BOOL)animated {
[self.navigationController setToolbarHidden:NO animated:animated];
[super viewWillAppear:animated];
}//end
/**
* View will disappear
*
* @version $Revision: 0.1
*/
- (void) viewWillDisappear:(BOOL)animated {
[self.navigationController setToolbarHidden:YES animated:animated];
[super viewWillDisappear:animated];
}//end
For the life of me, I cannot figure out where this is coming from. The extended detail stack trace is not showing any of my classes.
Where could this be coming from?
回答1:
If you are customizing the navbar tint color, or any other colors, in one of the three20 stylesheets, make sure you are returning an autoreleased color.
来源:https://stackoverflow.com/questions/5653771/uidevicergbcolor-leak-how-to-fix