Re: Severe ASOC runtime bug
Re: Severe ASOC runtime bug
- Subject: Re: Severe ASOC runtime bug
- From: Dave <email@hidden>
- Date: Thu, 20 Jan 2011 07:35:27 -0600
Hi Terence. I tried adding the missing value statement but it didn't change anything.
Even if AppleScript is requiring 1K of memory to store each of the 1,000 instances of the small script class that would only add up to a megabyte total. But, memory requirements go up to 1.1 Gigabytes within a few seconds and still aren't satisfied. The other problem is that any script code executing after this code in the program experiences random crashes and syslog message errors - a strong hint that internal run-time memory is getting clobbered.
-- Dave
On Jan 20, 2011, at 6:01 AM, Terence Heaford wrote: Hi,
I had memory issues with repeat loops at one time. What seemed to resolve it was
to set the object to missing value before executing the next pass through the loop.
It's as though the Garbage Collector does not know you are finished with it whilst in the repeat loop?
So your snippet
repeat with i from 1 to limit set anotherObj to DataItemClass's NewDataItem_(i as string) dict's addObject_forKey_(anotherObj, i as string) end repeat
would become
repeat with i from 1 to limit set anotherObj to DataItemClass's NewDataItem_(i as string) dict's addObject_forKey_(anotherObj, i as string) set anotherObj to missing value Whether this would resolve your issue, I don't know but please try. All the best
Terry
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden