Re: Questions regarding release
Re: Questions regarding release
- Subject: Re: Questions regarding release
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Thu, 26 Sep 2019 15:05:42 +0200
>
> The Xcode "analyze" step should check for errors of this kind. I have xcode
> set to analyze on every build, since it's usually not too slow.
Thanks a lot for the hint!
I tried it and it works pretty well.
I actually found 2 (small) leaks.
There is one place in my code (different from my OP),
where I get a "leaked" warning from the Analyzer, but I am not sure why that is.
Here is what the function basically does:
- (void) makeTextLayerRectangle: (CATextLayer*) textlayer fontsize: (float)
fontsize text: (NSString*) text
{
...
textlayer.bounds = CGRectMake( 0.0, 0.0, string_rect.width,
string_rect.height );
textlayer.shadowPath = CGPathCreateWithRect( textlayer.bounds, NULL );
}
But I get the warning
"Object leaked: allocated object of type 'CGPathRef _Nonnull' is not referenced
later in this execution path and has a retain count of +1"
Note that text layer is a call-by-reference var.
Is that just a bug in the Analyzer? Am I missing something?
Best regards, Gabriel
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden