Copy link to clipboard
Copied
I am learning to script PhotoShop using JavaScript (ExtendScript). On page page 20 of the PhotoShop Scripting Guide CC 2014, a simple "hello world" script is presented. At the end of this script the following code is included:
// Release references
docRef = null
artLayerRef = null
textItemRef = null
Why is this necessary? Wouldn't the completion of this script cause garbage collection to forget about these references? Or are these references maintained for some reason while running PhotoShop and so releasing them is good for memory management?
Yes ExtendScript has Garbage Collection… I've never had the need to use…
blah = boo = foo = null; // I see very few users bothering to do this…
There is also the $.gc() method available too…
Copy link to clipboard
Copied
Yes ExtendScript has Garbage Collection… I've never had the need to use…
blah = boo = foo = null; // I see very few users bothering to do this…
There is also the $.gc() method available too…
Copy link to clipboard
Copied
Thanks!