• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't obtain any more NSPipe instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't obtain any more NSPipe instances


  • Subject: Re: Can't obtain any more NSPipe instances
  • From: "Jordan Krushen" <email@hidden>
  • Date: Sun, 28 May 2006 19:10:08 -0700

On 5/28/06, Alexander Reichstadt <email@hidden> wrote:

There is some odd behaviour with NSPipe I can't figure out, or maybe
it's with my code. The following demonstrates the problem; when
running the following code it always fails at iteration 246:

Here's a hint: % ulimit -a

Don't change the limit, BTW.  It's a useful warning that you're using
up more resources than necessary (unless you *really* need that many
concurrent open fds), and other users will have the default limit,
too.

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

[pipe release];
[task release];

Why does it fail at 246, is there anything I can do differently to
remove the limit of NSPipe instances I can obtain?

You're using autoreleased pipes without a local autorelease pool, so they're accumulating. You could add a local pool, or just alloc/init and manually release when you're done with them.

Try running it before and after the changes under ObjectAlloc, too
(Debug -> Launch Using Performance Tool -> ObjectAlloc).  It can
graphically point out rapidly growing instances like this.

HTH,

J.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Can't obtain any more NSPipe instances
      • From: "Jordan Krushen" <email@hidden>
References: 
 >Can't obtain any more NSPipe instances (From: Alexander Reichstadt <email@hidden>)

  • Prev by Date: Re: Can't obtain any more NSPipe instances
  • Next by Date: Re: Can't obtain any more NSPipe instances
  • Previous by thread: Re: Can't obtain any more NSPipe instances
  • Next by thread: Re: Can't obtain any more NSPipe instances
  • Index(es):
    • Date
    • Thread