views:

112

answers:

1

I am monitoring my application using Activity Monitor and whenever NSOpenPanel is called the application appears as having 9 threads and stays like that until the application is closed.

Is there a way to release those threads?, Or am I simply misunderstanding what the threads number means?, surely it isn't a good thing to have them open for no reason.

Any help would be appreciated

+2  A: 

It looks like the threads are created for tasks such as detecting drives being mounted, so that NSOpenPanel can add them to its sidebar. It looks like a bunch of threads get created when the panel is open, and several of them are destroyed afterwards, but a few do still hang around. The threads aren't doing any work though, they're just blocked waiting for various events to happen. So, they may take up a bit of memory, but they shouldn't affect performance or anything like that. There isn't any way for you to get rid of them in your program though.

Brian Webster