Hi,

I’ve narrowed this down to a third party framework and I think that using XCode 
6.2 might be a red herring and it may well have happened in 6.1 too.

Is there anything special a third party Framework has to do in order to make 
the Analyzer report a memory leak if an object is leaked? I thought that any 
method that has a name that begins in “alloc”, “new”, “init”, “copy” that 
returns an object, the compiler/analyzer assumes the object has a +1 retain 
count?

In this example:

-(void) testMethod
{
FrameworkObj*           myFrameworkObj;
NSString*                       myString;

myString = [[NSString alloc] initWithFormat:@“%@:%@“,@“Test”,@“001”];
myFrameworkObj = [[FrameworkObj alloc] initWithWidgetName:myString];
}

The analyzer reports a leak of myString, but not of myFrameworkObj.

Does anyone have any idea why?

All the Best
Dave


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to