• 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: Arbitrary polygons crash -[NSBezierPath stroke]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arbitrary polygons crash -[NSBezierPath stroke]


  • Subject: Re: Arbitrary polygons crash -[NSBezierPath stroke]
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 28 Jun 2006 02:31:05 +0200

Am 28.06.2006 um 01:05 schrieb Tom Bernard:
   enumerator = [executionList objectEnumerator];
    while (anOnScreenObject = [enumerator nextObject])
    {
        [anOnScreenObject die];
        [objectArray removeObject:anOnScreenObject];
    }
    [executionList removeAllObjects];

At the top of the docs for NSEnumerator, I found the following note:

>>
Note: It is not safe to modify a mutable collection while enumerating through it. Some enumerators may currently allow enumeration of a collection that is modified, but this behavior is not guaranteed to be supported in the future.
<<


So, you may be stomping memory by doing this, thus causing the crash that occurs later.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Arbitrary polygons crash -[NSBezierPath stroke]
      • From: Tom Bernard <email@hidden>
References: 
 >Arbitrary polygons crash -[NSBezierPath stroke] (From: Tom Bernard <email@hidden>)

  • Prev by Date: Re: Beginner Question About CustomView, -drawRect: and Plotting Data.
  • Next by Date: using NSURLConnection to get only the HTTP header
  • Previous by thread: Arbitrary polygons crash -[NSBezierPath stroke]
  • Next by thread: Re: Arbitrary polygons crash -[NSBezierPath stroke]
  • Index(es):
    • Date
    • Thread