Does ExtendScript Have Garbage Collection?
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?