• 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: NSOperations leaking ports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperations leaking ports


  • Subject: Re: NSOperations leaking ports
  • From: Martin Redington <email@hidden>
  • Date: Tue, 12 Feb 2008 13:08:01 +0000


Quite a lot of common operations (for example, some distributed objects calls) will generate additional mach ports.


Sometimes these are released correctly when you call the appropriate cleanup functions, and sometimes they're not (or its non-obvious what the correct cleanup functions are).

In the latter case, it's often possible to cache the object whose creation led to the additional mach ports, rather than recreating it each time.

As far as finding the problem spot, try sampling the app, or commenting out blocks until you stop getting the extra ports.


On 12 Feb 2008, at 07:13, Michael Hanna wrote:

My application uses NSOperation/Queue to retrieve images off of the
web (I use the ObjectiveFlickr API and NSURLConnection). I find that
when I run the application though, in top I have a huge number of
ports open, #PRTS(upward of 1500 after creating many NSOperations). I
have looked around my code but not sure of the best place to look for
solutions to the issue. So far I've tried simply calling [self cancel]
when I'm certain the NSOperation is no longer needed.

Any other suggestions on how to diagnose/solve the issue?

Michael
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40ucl.ac.uk


This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSOperations leaking ports (From: "Michael Hanna" <email@hidden>)

  • Prev by Date: Re: Objective-C++
  • Next by Date: Event Tap strangeness
  • Previous by thread: NSOperations leaking ports
  • Next by thread: Re: NSOperations leaking ports
  • Index(es):
    • Date
    • Thread