Skip to content

Commit d86f7d5

Browse files
committedJul 22, 2016
Don't load view
1 parent 0996862 commit d86f7d5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎MLeaksFinder/MLeaksFinder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#define _INTERNAL_MLF_ENABLED DEBUG
1717
#endif
1818

19-
//#define MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED 0
19+
//#define MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED 1
2020

2121
#ifdef MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED
2222
#define _INTERNAL_MLF_RC_ENABLED MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED

‎MLeaksFinder/UIViewController+MemoryLeak.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ - (BOOL)willDealloc {
5959

6060
[self willReleaseChildren:self.childViewControllers];
6161
[self willReleaseChild:self.presentedViewController];
62-
[self willReleaseChild:self.view];
62+
63+
if (self.isViewLoaded) {
64+
[self willReleaseChild:self.view];
65+
}
6366

6467
return YES;
6568
}

0 commit comments

Comments
 (0)
Please sign in to comment.