Created
September 28, 2012 22:27
-
-
Save mattjgalloway/3802388 to your computer and use it in GitHub Desktop.
Leaks detection not working for UIViewController subclass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SubclassNSObject : NSObject | |
@property (nonatomic, strong) SubclassNSObject *other; | |
@end | |
@implementation SubclassNSObject | |
@end | |
@interface SubclassUIViewController : UIViewController | |
@property (nonatomic, strong) SubclassUIViewController *other; | |
@end | |
@implementation SubclassUIViewController | |
@end | |
{ | |
SubclassNSObject *a = [SubclassNSObject new]; ///< Leak detected | |
a.other = a; | |
SubclassUIViewController *b = [SubclassUIViewController new]; ///< Leak **NOT** detected | |
b.other = b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have no idea why the
SubclassNSObject
shows as a leak butSubclassUIViewController
does not :-(. Sniffs of a bug to me.