• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Does ExtendScript Have Garbage Collection?

Guest
Jul 10, 2014 Jul 10, 2014

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?

TOPICS
Actions and scripting

Views

638

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guru , Jul 11, 2014 Jul 11, 2014

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…

Votes

Translate

Translate
Adobe
Guru ,
Jul 11, 2014 Jul 11, 2014

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…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 11, 2014 Jul 11, 2014

Copy link to clipboard

Copied

LATEST

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines