Re: [Q] Bunch of memory leak message
Re: [Q] Bunch of memory leak message
- Subject: Re: [Q] Bunch of memory leak message
- From: Philip Aker <email@hidden>
- Date: Mon, 30 Jun 2008 21:04:08 -0700
On 08-06-30, at 10:18, JongAm Park wrote:
I have a strange problem with the AppleScript script file. I am not
even sure if this is a problem.
I have a PPC Tiger machine ( iMac 17" Sunflower) and Intel Leopard
machine( MacBook) at home.
I also I use a Intel Leopard machine (MacBook Pro 17") at work.
When I invoke an Applescript file by : osascript <file name>, it
works on all 3 machines.
However, if sudo osascript < file name > is issued, only on the
MacBook Pro, it compalins this.
*** _NSAutoreleaseNoPool(): object 0x.... of class .... autoreleased
with no pool in place - just leaking.
It is strange because :
- There is no such problem with my own MacBook with the Leopard
- it only happens when sudo is prepended to the osascript command on
the MacBook Pro.
By the way, the AppleScript command sent by the script file is
handled OK.
Can anyone tell me why such message is displayed only on the Intel
Leopard machine, i.e. MacBook Pro?
(Another intel Leopard machine, my own MacBook, doesn't have this
problem. So I guess something was broken on the MacBook Pro. )
You could try running the script on the MacBook Pro and immediately
afterwards, open up Console. There might be some extra information
about the message. Usually this kind of warning occurs when the
offending code makes Objective-C calls in C functions with bracketing
those calls with:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//code
[pool drain];
If it's not crashing your script, you might be able to obscure the
message by calling osascript like:
sudo osascript <file name> 2>/dev/null
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
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