views:

44

answers:

1

Hi,

If I terminate (or interrupt) a suspended NSTask, then it still shows up in activity monitor. It isn't running because the CPU is 0% but it's still taking up memory. Is there a work around?

A: 

If you have instantiated the NSTask by using Alloc/init, there should be no problem. The NSTask will eventually get caught by the garbage collector, and the memory will be cleared accordingly. When the application closes entirely the allocated space and memory will be cleared aswell, like it should.

BryCry
Yes you're right. But it still shows up in Activity monitor. Even after it's released.
Jef
Which means the allocation isnt cleared yet. the garbage collector stops by every now and then when the space is needed.When your application stuffs itself with data i'm almost 100% sure the activity will clear from the monitor.
BryCry