Kyle,

Good ideas, but the static analyzer is Xcode 3.2, which requires 10.6 I believe. I'm still running 10.5.

Bob

On Nov 10, 2009, at 1:30 PM, Kyle Sluder wrote:

On Nov 10, 2009, at 12:57 PM, Bob Barnes <toadf...@comcast.net> wrote:

hi all,

My iPhone app has 2 subclasses of CALayer that appear as leaked objects when I run Instruments. In an effort to understand why I inserted calls to retainCount when allocating these objects. After calling alloc the reference count on my objects is 0, but after calling the init method, which basically just calls [super init], the reference count is 2. Is there something peculiar about CALayer that would explain this behavior?

Don't look at retainCount. There's no reason it couldn't be any number greater than 0 at any time. It will not help you debug your app.

Run the static analyzer on your code, use Instruments to track retains and releases, and use the debugger, not NSLog, as your debugging tool of choice.

--Kyle Sluder

_______________________________________________

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