• 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: Garbage Collection, Standard Out, NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage Collection, Standard Out, NSTask


  • Subject: Re: Garbage Collection, Standard Out, NSTask
  • From: Jon Gilkison <email@hidden>
  • Date: Tue, 16 Nov 2010 13:39:32 -0500

That was it, though further up the chain.  The object that created/owned the task was being GC'd away.

Thanks Bill and Quincy!

On Nov 16, 2010, at 12:53 PM, Bill Bumgarner wrote:

> The issue [I'd bet -- don't have time to dive deep] is that you don't have a strong reference to the Tasker instance.
>
> Since notification observers don't hold strong references to observers, either, the garbage collector sees Tasker as garbage and collects it.
>
> You could fix this any number of ways;
>
> - keep a reference to the Tasker instance as an iVar
> - keep a global set around of "active taskers" and have 'em remove themselves when they are done
> - use CFRetain or the NSGarbageCollector API to tell the collector not to collect the tasker before done.
>
> b.bum

_______________________________________________

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: 
 >Garbage Collection, Standard Out, NSTask (From: Jon Gilkison <email@hidden>)
 >Re: Garbage Collection, Standard Out, NSTask (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Is App in Resources App Bundle Evil?
  • Next by Date: Re: Core Data: During Migration, should use Primitive Accessors only?
  • Previous by thread: Re: Garbage Collection, Standard Out, NSTask
  • Next by thread: Re: Garbage Collection, Standard Out, NSTask
  • Index(es):
    • Date
    • Thread