Hi,
I am trying to learn to program in Objective-C and Cocoa, still getting
the
basics though.
What I want to know about is memory management.
If I have the following program :-
int main( int argc, char *argv[])
{
NSFileHandle *stdout = [NSFileHandle fileHandleWithStandardOutput];
NSString *test = [NSString stringWithCString: argv[0]];
Char *cstring = [test UTF8String];
[stdout writeData: [NSData dataWithBytes: cstring length: strlen(
cstring)];
[stdout fileClose];
[test autorelease]
return 0;
}
I am getting messages saying "autoreleased with no pool in place".
How do I go about creating a pool if thats what I need to do ?
Otherwise how do I do the memory management.
Many thanks in advance,
Aaron