• 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: Bill Bumgarner <email@hidden>
  • Date: Tue, 16 Nov 2010 09:53:52 -0800

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

  • Follow-Ups:
    • Re: Garbage Collection, Standard Out, NSTask
      • From: Jon Gilkison <email@hidden>
References: 
 >Garbage Collection, Standard Out, NSTask (From: Jon Gilkison <email@hidden>)

  • Prev by Date: Re: Get current caret position
  • Next by Date: Re: Core Data: During Migration, should use Primitive Accessors only?
  • Previous by thread: Garbage Collection, Standard Out, NSTask
  • Next by thread: Re: Garbage Collection, Standard Out, NSTask
  • Index(es):
    • Date
    • Thread