I believe I have encountered a bug in Script Debugger’s Leaked Resources detector. Consider the following script, which I believe has correct syntax (and it runs fine in Script Editor) :
set thePath to (path to desktop as Unicode text) & "Wilbur.txt" set fRef to (open for access thePath with write permission) set theFile to alias "MacintoshHD:Users:david:Desktop:Wilbur.txt" close access theFile
Upon running, Script Debugger will report a Leak. The following test indicates an erroneous leak report:
- Run the script and cancel out of the resulting Leaked Resources window, so that Script Debugger will not close the leak.
- Comment out the second line (which opens access.)
- Run the script. Script Debugger reports an error that the file was not open. This indicates that the close access command was executed the first time.
Mac Pro (late 2019)
Script Debugger 8A27