how can I allocate custom memory?
+1
A:
By using [[obj alloc] init]
, where obj
is the object you would like to allocate memory for and initialize.
Cide
2009-07-28 10:28:27
+1
A:
What do you mean by custom memory? Just a block of memory?
Simply use C memory allocation:
char *myMemory = malloc(1000); // allocates 1,000 bytes of "custom" memory
Philippe Leybaert
2009-07-28 10:29:21