Re: Memory leak when adding records in Filemaker
Re: Memory leak when adding records in Filemaker
- Subject: Re: Memory leak when adding records in Filemaker
- From: Bruce Robertson <email@hidden>
- Date: Sun, 13 Jan 2013 23:19:40 -0800
On Jan 13, 2013, at 9:33 PM, Beatrix Willius wrote:
> I have this ages old script to transfer data to Filemaker, but since a while there seems to be a memory leak in Filemaker. When I let the example below run the memory goes only up and up. Until Filemaker crashes or there is an error message "-10001, Object or property is the wrong type".
>
> property MainMailbox : "s iosdf asödf ,asdf."
> property MainSubject : "sdf lasdkf asdlfkasdflk "
> property MessageBody : "asd lkfasdfpäoaädö flsdf sadlfasdf ölasdfalksdf sdfköj asdflk asdfopapäe asödf asldkf asd asödf asdföäasöädfasdf"
> property OriginatorFrom : "sdfl ksdf asldkfasldfkasldfk"
>
> with timeout of 10000 seconds
> repeat 10000 times
> tell application "FileMaker Pro Advanced"
> go to layout "all Fields Mail"
> save
> set myNewRecord to (create new record with data {MainMailbox, MainSubject, MessageBody, OriginatorFrom})
> save
> end tell
> end repeat
> end timeout
>
> Does anyone have an idea how to fix this? This problem occurs for both Filemaker 11 and 12. The memory in Filemaker is not reclaimed as it should be when a garbage collector runs. Have tried this, too, by adding a delay of 2 seconds after 10 records.
>
I would think this would be better written as:
property MainMailbox : "s iosdf asödf ,asdf."
property MainSubject : "sdf lasdkf asdlfkasdflk "
property MessageBody : "asd lkfasdfpäoaädö flsdf sadlfasdf ölasdfalksdf sdfköj asdflk asdfopapäe asödf asldkf asd asödf asdföäasöädfasdf"
property OriginatorFrom : "sdfl ksdf asldkfasldfkasldfk"
with timeout of 10000 seconds
tell application "FileMaker Pro Advanced"
save
go to layout "all Fields Mail"
repeat 10000 times
set myNewRecord to (create new record with data {MainMailbox, MainSubject, MessageBody, OriginatorFrom})
save
end repeat
end tell
end timeout
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden