Something like this?
static NSAutoreleasePool *pool = nil;
void runloop(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void
*info) {
if (activity & kCFRunLoopEntry) {
if (pool!=nil) [pool drain];
pool = [NSAutoreleasePool new];
} else i
Here is some proof that it is still in memory, I waited about 5 minutes and it
didn't dealloc automatically like you said it will...
<>
When I wrap a NSAutoreleasePool around the notification method, it releases as
expected. I cannot have my application doing this as it is a background
applicati
On Fri, Feb 18, 2011 at 7:36 PM, Mr. Gecko wrote:
> Yes, that would be it, when I open the UI it releases the pool. Is there a
> way to prevent this from happening just incase I have other things that are
> autoreleasing to it?
Nest your own autorelease pool. You can use a runloop observer to m
Yes, that would be it, when I open the UI it releases the pool. Is there a way
to prevent this from happening just incase I have other things that are
autoreleasing to it?
On Feb 18, 2011, at 8:20 PM, Ken Thomases wrote:
> Is your application getting any real GUI-style events, or is it only
>
That may be the problem as this is a UIAgent and not a real GUI. The only GUI
that appears is when you first open it or you open it again to change settings.
I have many other types of notifications I'm listening for such as carbon
events and accessibility events, but I don't know if they are ad
On Feb 18, 2011, at 3:00 PM, Mr. Gecko wrote:
> I noticed that memory is not autoreleased when I receive a distributed
> notification, the only way to fix this is to wrap it in a autorelease pool,
> but this shouldn't be right? I would think that when you register for a
> notification it'll be
More information found. This may be a bug. I found this really cool method for
NSAutoreleasePools called showPools. It is really useful for something like
this. I found that it has a autorelease pool, but it never drains. It just
gains items until it gets to 1016 items and then I don't know what
I know that you think I'm some noob at this. This may be true, but I am aware
that Instruments shows that the memory I allocated during that distributed
notification is still there. I know this because it's a 9MB allocation and it's
in a NSData with no copy bytes and free when released. The one
On 18 Feb 2011, at 3:00 PM, Mr. Gecko wrote:
> I noticed that memory is not autoreleased when I receive a distributed
> notification, the only way to fix this is to wrap it in a autorelease pool,
> but this shouldn't be right? I would think that when you register for a
> notification it'll be o