aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-11-03 15:30:15 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-11-03 15:30:15 +0000
commitc8f808d09529cfcdccad070d5782820309e99770 (patch)
tree2c1f5062fd9c2de135a89c6be6259870261135d9 /AppKit
parent371dc04d5eee387439a6345e486eba9b8a1d0060 (diff)
[Author: thomasvl]
Fix memory model by making all the outlets assign not retain. The problem here is UIViewControllers will dump their view in low memory and then reload next time it is needed. So someone hangs on to the localizer for something else, it would keep the views also loaded, so this way the localizer won't keep any of the objects it points to alive via a retain. Note: the AppKit version sorta matches this since outlets aren't retained by default. Clear them in awakeFromNib since that is all they are needed for. R=dmaclach DELTA=19 (9 added, 0 deleted, 10 changed)
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMUILocalizer.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/AppKit/GTMUILocalizer.m b/AppKit/GTMUILocalizer.m
index ffcc11d..9f252e7 100644
--- a/AppKit/GTMUILocalizer.m
+++ b/AppKit/GTMUILocalizer.m
@@ -57,6 +57,10 @@
} else {
_GTMDevLog(@"Expected an owner_ set for %@", self);
}
+ // Won't need these again, clear them.
+ owner_ = nil;
+ otherObjectToLocalize_ = nil;
+ yetAnotherObjectToLocalize_ = nil;
}
+ (NSBundle *)bundleForOwner:(id)owner {