UndetachedDelegate false negative for instance variable declared in class extension

Issue #100 resolved
JinZhuHuang created an issue

As the code shown below, Fauxpas won't raise an UndetachedDelegate warning...

@interface TempTestController ()
{
    DelegateDetachDemo *_demo;
}
@end

@implementation TempTestController
- (instancetype)init
{
    self = [super init];
    if (self) {
        _demo = [[DelegateDetachDemo alloc] init];
        _demo.delegate = self;
    }
    return self;
}

- (void)dealloc
{
    [_demo release];
    [super dealloc];
}

But when the member variable is replace with a property declaration, Fauxpas would give the UndetachedDelegate warning!

@interface TempTestController ()

@property (nonatomic, retain) DelegateDetachDemo *demo;

@end

Comments (3)

  1. Log in to comment