Hello,

How is it that it starts to malfunction after such amount of time?

Because the leak builds up over time until you run out of file descriptors, and -[NSPipe init] finally starts returning nil.

Yeah, I figured it out like 10 minutes after I asked that question. Found this discussion helpful:
http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg03221.html

I think I finally managed to fix my issues. First of all, I added these two lines, which seem to change the most:

[netstat waitUntilExit];
[netstat release];

Secondly, I'm now initializing NSPipe like this:

NSPipe *thePipe = [NSPipe pipe];

instead of:

NSPipe *thePipe = [[NSPipe alloc] init];

Finally, I made a few other changes. For an overview, take a look how my .m code looked like before:

http://ipshowx.pastebin.com/ARFR3HRr

and how it looks now:

http://ipshowx.pastebin.com/wbpX3qGq

I know there are still a few things that I should change but as I said, it's my first Cocoa application and I've got a lot to learn :)

Anyway, thank you all for your replies. As you can see, you pointed me in the right direction and clarified some things to me.

Regards,
kaziorvb

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to