--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sat Aug 28 05:35:02 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Aug 29 16:55:27 2010 +0200
@@ -135,23 +135,21 @@
sdlwindow = display->windows;
}
+-(void) didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning];
+ if (self.popupMenu.view.superview == nil)
+ self.popupMenu = nil;
+ MSG_MEMCLEAN();
+}
+
-(void) viewDidUnload {
- // only object initialized in viewDidLoad should be here
+ // only objects initialized in viewDidLoad should be here
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
dimTimer = nil;
MSG_DIDUNLOAD();
[super viewDidUnload];
}
--(void) didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
- // Release any cached data, images, etc that aren't in use.
- if (popupMenu.view.superview == nil)
- popupMenu = nil;
- MSG_MEMCLEAN();
-}
-
-
-(void) dealloc {
[popupMenu release];
[popoverController release];