Re: malloc in obj-c/cocoa
Re: malloc in obj-c/cocoa
- Subject: Re: malloc in obj-c/cocoa
- From: Fritz Anderson <email@hidden>
- Date: Fri, 6 Feb 2004 15:50:43 -0600
The code below assigns into posp[i], which is one beyond the malloc'ed
scope of posp. (The last valid subscript for posp is i-1).
In general, there is no special interaction between malloc() and
Objective-C, other than that you can expect +alloc to be implemented in
terms of the malloc() family.
-- F
On 6 Feb 2004, at 3:14 PM, Ben Dougall wrote:
PositionPtr posp;
posp = (PositionPtr) malloc( i ));
while( i >= 0 ) {
*(posp + i) = *(Buffer + i);
i--;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.