Re: nil there not here
Re: nil there not here
- Subject: Re: nil there not here
- From: Greg Guerin <email@hidden>
- Date: Mon, 27 Jul 2009 15:17:28 -0700
David Blanton wrote:
_myDocumentView = [[MyDocumentView alloc] init];
[_myDocumentView retain];
This is over-retaining _myDocumentView. You called alloc/init, so
you already own the instance. If you retain it again, you're not
gaining anything. Unless you're doing the extra retain because
you're over-releasing somewhere else. Then the extra retain is
hiding the symptom of the over-release bug.
Regarding the rest of your code, is it possible for -drawRect to be
called before readFromData has been called and returned? I note this
in particular because drawRect is basically a callback rather than
something you directly invoke.
Is MyDocumentView being added to a view hierarchy before readFromData
has been invoked?
And is there a reason readFromData isn't a method of MyDocumentView?
It seems odd to be manipulating another object's ivars directly from
some other class.
-- 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