• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Questions regarding release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Questions regarding release
      • From: "Glenn L. Austin via Cocoa-dev" <email@hidden>
  • Prev by Date: Re: A question in regards to AddInstanceForFactory
  • Next by Date: Re: Views without any layout constraints may clip their content or overlap other views
  • Previous by thread: Re: Questions regarding release
  • Next by thread: Re: Questions regarding release
  • Index(es):
    • Date
    • Thread