• 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: memory advice for still learning coder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory advice for still learning coder


  • Subject: Re: memory advice for still learning coder
  • From: "Rick C." <email@hidden>
  • Date: Sat, 3 Oct 2009 09:43:07 -0700 (PDT)

thanks ken for all the input.  i will work on the things you've mentioned.  i really appreciate it!

rick





________________________________
From: Ken Thomases <email@hidden>
To: Rick C. <email@hidden>
Cc: cocoa dev <email@hidden>
Sent: Saturday, October 3, 2009 10:37:11 PM
Subject: Re: memory advice for still learning coder

Oh, and I forgot to respond to this:

On Oct 3, 2009, at 9:17 AM, Rick C. wrote:

> 4.  i don't believe i'm having a problem with the arrays being accessed the same time by different threads.  although i am not using a lock.

If I'm understanding what you're saying, you're courting disaster.  If there's any chance at all that a mutable array is being mutated in one thread at the same time as another thread is accessing the array, then you must guard that with a lock.  The fact that (you think) you've never seen a problem in your testing so far is no guarantee that your app won't have a problem under different loads, on machines with different numbers of CPU cores, or just randomly but with somewhat low probability.  The possible problem might be obvious, like a crash, but it might be insidious like data corruption that isn't immediately noticed.

Regards,
Ken



_______________________________________________

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: 
 >memory advice for still learning coder (From: "Rick C." <email@hidden>)
 >Re: memory advice for still learning coder (From: Ken Thomases <email@hidden>)
 >Re: memory advice for still learning coder (From: "Rick C." <email@hidden>)
 >Re: memory advice for still learning coder (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: releasing a object containing others in a array
  • Next by Date: Re: Keeping NSWindow below all other windows
  • Previous by thread: Re: memory advice for still learning coder
  • Next by thread: releasing a object containing others in a array
  • Index(es):
    • Date
    • Thread