• 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
How is this an "incorrect decrement of a reference count"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How is this an "incorrect decrement of a reference count"?


  • Subject: How is this an "incorrect decrement of a reference count"?
  • From: G S <email@hidden>
  • Date: Mon, 19 Mar 2012 05:18:47 -0700

I have this in my header file:

*

**

@property (nonatomic, retain) UIImagePickerController* imagePicker;
**

*
The analyzer is complaining about lines like this (but not always):

*

self.imagePicker = [[UIImagePickerController alloc] init];

[self.imagePicker release];

*
I do this in many places, but in a few of them the analyzer says:

*Property returns an Objective-C object with a +0 retain count*
*Incorrect decrement of the reference count of an object that is not owned
at this point by the caller*

Is this just a bug in the analyzer?  I can find no difference between the
times it makes this complaint and the many more times that it doesn't.

Thanks for any insight.
_______________________________________________

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: How is this an "incorrect decrement of a reference count"?
      • From: David Duncan <email@hidden>
    • Re: How is this an "incorrect decrement of a reference count"?
      • From: Roland King <email@hidden>
  • Prev by Date: Re: const correctness
  • Next by Date: Re: How is this an "incorrect decrement of a reference count"?
  • Previous by thread: How often are you guys checking isViewLoaded?
  • Next by thread: Re: How is this an "incorrect decrement of a reference count"?
  • Index(es):
    • Date
    • Thread