Re: odd behavior with NSError?
Re: odd behavior with NSError?
- Subject: Re: odd behavior with NSError?
- From: Greg Guerin <email@hidden>
- Date: Fri, 16 Oct 2009 11:18:44 -0700
Kevin Bracey wrote:
If we get an NSError, or in the case of NSAppleScript an
NSDictionary with the error description, what is the Retain count
and do we release it when we're done with it?
Wrong question. The retain count is not an ownership count. The
right question is "Do I own it?" If you own it, you're responsible
for releasing it. If you don't own it, you must not release it.
I'd been not releasing them, I didn't allocate or copy it, but when
I Build and Analyzed my code in 3.2 on Snow Leopard it said that I
had a retain count of +1. Am I leaking?
Any advice on this?
Find the word "NSError" on this page:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/
MemoryMgmt/Articles/mmObjectOwnership.html
It's under the heading "Objects Returned by Reference".
-- GG
_______________________________________________
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