• 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: Need advice: Object ownership and threading issue, causing a rare crash.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need advice: Object ownership and threading issue, causing a rare crash.


  • Subject: Re: Need advice: Object ownership and threading issue, causing a rare crash.
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 02 May 2013 09:53:54 -0700

On May 1, 2013, at 5:10 AM, Motti Shneor <email@hidden> wrote:

> Currently, MyB retains itself within its thread, and releases itself just before the thread exits. I know it is bad practice (self retaining objects), but I did not yet think of a better way.
>
> This way, when the owner releases its MyB and replaces its reference with a new MyB object, the MyB is just released once, and does not get deallocated. When its thread finishes its cycle in the background, the thread function releases the objects again, and returns.

That's fine, IMHO, and I've both read and written code that does this.

—Jens
_______________________________________________

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: Need advice: Object ownership and threading issue, causing a rare crash.
      • From: Ken Thomases <email@hidden>
References: 
 >Need advice: Object ownership and threading issue, causing a rare crash. (From: Motti Shneor <email@hidden>)

  • Prev by Date: Re: Double tap inside a UICollectionViewCell
  • Next by Date: Re: Need advice: Object ownership and threading issue, causing a rare crash.
  • Previous by thread: Re: Need advice: Object ownership and threading issue, causing a rare crash.
  • Next by thread: Re: Need advice: Object ownership and threading issue, causing a rare crash.
  • Index(es):
    • Date
    • Thread