Re: Arbitrary polygons crash -[NSBezierPath stroke]
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