On 27 Sep 2009, at 10:03, Nick Rogers wrote:
Hi,
When I alloc and init a NSString the following way, there is warning
that:
Potential leak of an object allocated on line 526 and stored in
sizeDisp.
1. Method returns an Objective-C object with a +1 retain count
(owning reference).
2. Object returned to caller as an owning reference (single retain
count transferred to caller).
3. Object allocated on line 526 and stored into 'sizeDisp' is
returned from a method whose name
('tableView:objectValueForTableColumn:row:') does not contain 'copy'
or otherwise starts with 'new' or 'alloc'. This violates the naming
convention rules given in the Memory Management Guide for Cocoa
(object leaked).
Can I hope for a small analysis of the above from anybody?
It's hard to see how item 3 above can be improved on as an analysis
except by providing a link to the memory management guidelines. So
here they are.
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994
Thanks,
Nick
_______________________________________________
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/adc%40jeremyp.net
This email sent to a...@jeremyp.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/archive%40mail-archive.com
This email sent to arch...@mail-archive.com