Reputation: 2778
i got an message at my log file (GDB) as object is leaking... NsAutorelease pool.. like something nearly for 10 times. Can anyone explain me. why this message is displaying..?
Thanks in advance.
Upvotes: 0
Views: 272
Reputation: 58
I generally use:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Your autoreleased objects
[pool release];
But it depends on where in your code you're running in to the issue... Are you using multi-threading? Or is everything happening in the main thread?
Upvotes: 0
Reputation: 17143
It means you are autoreleasing objects with no autorelease pool in place. So those objects are not being released, and are probably leaking as a result.
So you should make sure you have a pool in place.
Upvotes: 3