Here's the block of surrounding code:

NSFont *ageStarTextFont = [NSFont fontWithName:@"Arial Bold"
                                                                                
                                          
size:KRLesserDimensionOfRect(transientDrawingRect)/3];
NSMutableDictionary *txtAttributes = [NSMutableDictionary dictionaryWithObject:ageStarTextFont
                                                                                
                                                                                
                        forKey:NSFontAttributeName];
                                        
                                        /* Add a white outline attribute for 
readability */
// NSColor *textStrokeColor = [[NSColor whiteColor] colorWithAlphaComponent:0.7];
                                        [txtAttributes setObject:[NSNumber 
numberWithFloat:-6.0]
                                                                          
forKey:NSStrokeWidthAttributeName];
                                        [txtAttributes setObject:textStrokeColor
                                                                          
forKey:NSStrokeColorAttributeName];
                                        
                                        /* Draw the string for the age star in 
the grid */
                                        NSString *ageStarInfo = 
[portent.ageStar stringValue];
                                        [ageStarInfo drawCenteredInRect: 
centerBox
                                                                         
withAttributes: txtAttributes];


Any ideas?

Thanks,

Kevin


On Mar 21, 2009, at 4:51 PM, mm w wrote:

be careful with clang, sometimes is missing point,
your problem is coming not from this @"Arial Bold",
give the complete stack and explain what is the condition of the leak

False/positive: I have an extensive use of perf tools since years and
I didn't see that since a while
the leak can be deeper than your app === give the complete stack- trace

On Sat, Mar 21, 2009 at 4:43 PM, Kevin Ross <faderan...@sbcglobal.net> wrote:
Whoops, I thought that I'd also mention that I've run the code though the clang static analyzer and it doesn't report that there are any bugs. I'm
also happy to post more code if it will help.

Thanks again!

Kevin


On Mar 21, 2009, at 4:36 PM, Kevin Ross wrote:

Hi everyone, I'm auditing my app and the both the "leaks" command line tool and the Instruments tool are both reporting that I have NSString leaks.
 All of the leaks are coming from code similar to the following:

NSFont *ageStarTextFont = [NSFont fontWithName:@"Arial Bold"
size:KRLesserDimensionOfRect(transientDrawingRect)/3];

I'm guessing that the string in question is the @"Arial Bold" since it that is the only string on that line, but from what I understand a string created like that doesn't require a -release message. Could these be false positives generated by the leaks tool, or is there something that I'm
missing?

Thanks for any pointers!


Kevin Ross

Twenty-Four Mountains
Mac Feng Shui Software
ke...@twentyfourmountains.com
twentyfourmountains.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:

http://lists.apple.com/mailman/options/cocoa-dev/faderanger%40sbcglobal.net

This email sent to faderan...@sbcglobal.net


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/openspecies%40gmail.com

This email sent to openspec...@gmail.com




--
-mmw

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to