NSAutoreleasePool
NSAutoreleasePool
- Subject: NSAutoreleasePool
- From: "Amit Sadana" <email@hidden>
- Date: Wed, 14 Jan 2004 18:14:33 +0530
- Thread-topic: NSAutoreleasePool
Consider the following sample code:
-(void) myMethod
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
// lot of stuff going on here with lot of memory allocations
[pool release];
}
1. Do I have to explicitly do an autorelease to ensure that is handled
by my current NSAutorelease pool
2. What if I want to release some allocated memory on my own by doing an
explicit [... release] call. I have observed this is not at all
possible. It simply causes the application to crash. This holds true
even if I am doing the allocation and release at a very deep nested
level place in code called from a method (within NSAutorelease alloc and
pool release block) from -myMethod
_______________________________________________
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.