Re: Question regarding getRectsBeingDrawn:'s constant array pointer argument (const NSRect **)
Re: Question regarding getRectsBeingDrawn:'s constant array pointer argument (const NSRect **)
- Subject: Re: Question regarding getRectsBeingDrawn:'s constant array pointer argument (const NSRect **)
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 9 May 2006 17:52:26 -0700
On 5/9/06, Eric <email@hidden> wrote:
The method signature is this:
- (void)getRectsBeingDrawn:(const NSRect **)rects count:(int *)count
Which according to the documentation, should be invoked as:
const NSRect *rects;
int count, i;
[self getRectsBeingDrawn:&rects count:&count];
This implies that getRectsBeingDraw will allocate an array of NSRect and
assign it to rects.
My question is, since I didn't allocate the array of NSRect, should I
deallocate the rects array after use, or will Cocoa take care of that for
me?
The array of rects is only valid while in drawRect:. You didn't
allocate them so you don't do any memory management for them.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden