iVars being incorrectly flagged as not released in dealloc.

Just upgraded to XCode 4.4 and I believe this behavior started with the upgrade, but I'm experiencing  some false positives: The following ivars are flagged as not released in dealloc, obviously incorrectly. I have several examples of this.

@synthesize loginButton = _loginButton;
@synthesize rememberUserIDSwitch = _rememberUserIDSwitch;
@synthesize forgotUserIDButton = _forgotUserIDButton;
@synthesize forgotPasswordButton = _forgotPasswordButton;




- (void) dealloc
{
    [_loginButton release], _loginButton = nil;
    [_rememberUserIDSwitch release], _rememberUserIDSwitch = nil;
    [_forgotUserIDButton release], _forgotUserIDButton = nil;
    [_forgotPasswordButton release], _forgotPasswordButton = nil;
    [_wireframe release], _wireframe = nil;
    [_userID release], _userID = nil;
    [_password release], _password = nil;
    [_dnString release], _dnString = nil;
    [_answer1 release], _answer1 = nil;
    [_answer2 release], _answer2 = nil;
    [_labels release], _labels = nil;


    [super dealloc];
}



Anyone else experiencing this?
3 comments

Seamus,
do you experience this in AppCode 1.5.7 or 1.6 EAP?
If you haven't checked, please try 1.6 EAP build and if the problem still exists, create a bug report with a sample project (I couln't reproduce it from the description).

0

It's occuring in 1.5.7. It's real a real strange issue, especailly since it doesn't happen for all properties and ivars.

I can get it to reproduce by renaming an ivar.

For example, previously we used a standard where the ivar was named using the convention of: ivar_   (the underscore at the end of the ivar name)

Using the rename factoring to change it to: _ivar causes the issues. Will try EAP.

0

Appears to be corrected in the EAP :)

BTW thanks for cleaning up the inspections, WRT to #define scope. Eliminated a ton of false positives. Also seems that code inspection now handles IBActions and IBOutlets correctly.

0

Please sign in to leave a comment.