- edited description
improper warning for "UndetachedDelegate"
Issue #88
new
When we import a "releaseXXX" helper method, and detach the delegate in this helper method, even since we call this "releaseXXX" in our dealloc, the FauxPas app continued to complaint about the "UndetachedDelegate" warning.
Example code as follow:
- (void)dealloc
{
[self releaseChildControllers];
[super dealloc];
}
- (void)releaseChildControllers
{
self.myLeftContoller.delegate = nil;
self.myLeftContoller = nil;
}
- (void)viewDidLoad
{
self.myLeftContoller = [[MyLeftViewController alloc] init] autorelease];
self.myLeftContoller.delegate = self;
/// some other codes...
}
Comments (4)
-
repo owner -
repo owner Thanks for reporting this. This is a known issue — Faux Pas doesn't perform control flow analysis here. If you were to detach the delegate directly in
-dealloc
the diagnostic should go away. -
repo owner - marked as enhancement
-
reporter since apple has open source the new llvm, will this enhancement supported in ther future?
- Log in to comment