UIDeviceRGBColor leak - how to fix?

放肆的年华 提交于 2019-12-11 21:25:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!