|
From: | Marcus G. Daniels |
Subject: | Re: [Swarm-Support] xcalloc question |
Date: | Fri, 16 Jun 2006 11:16:04 -0600 |
User-agent: | Thunderbird 1.5.0.2 (X11/20060501) |
David Camacho Trujillo wrote:
Probably better to use alloc:, but it doesn't really matter. There's no difference between x[mc]alloc and [mc]alloc other than that x[mc]alloc throws an exception if there is no memory instead of returning NULL.However tt is difficult to find information about “xcalloc” under Objective-c and Swarm, is it deprecated?
Which is the best way work with variable size arrays under Swarm?I like to allocate on the stack for moderate sized things (e.g. < 1mb). Just because the syntax is so easy:
int size = 10; double variable[size];..and you don't have to worry about memory leaks. (The memory is returned when the function or method finishes.)
[Prev in Thread] | Current Thread | [Next in Thread] |