Hi again,
I'm having yet another problem with memory management. I have a UIViewSubclass which I place on top of a view in a view controller. After being frustrated by the quartz drawings I make on the UIViewSubclass disappearing from the screen if I presented a modal view or pushed another view onto the nav controller stack, I realized that if I declare my view like so, it will remain even if I do one of the above actions.
Code:
if(draw == nil) {
draw = [[[DrawingView alloc] initWithFrame:self.view.frame] retain];
}
I release "draw" in the dealloc of the view controller I put it "draw" on, and I can confirm that release command does get called.
However, the problem is that the dealloc of the "draw" view does not get called. Therefore, every time the "draw" instance is created (this could happen multiple times, depending on the user), another 2mb of ram vanishes.
Any suggestions would be much appreciated. Thanks in advance!