# Memory leaks with Photoshop's Javascript

**URL:** <https://forum.kirupa.com/t/memory-leaks-with-photoshops-javascript/156979>\
**Category:** design\
**Created:** [July 29, 2005, 5:38am UTC](https://forum.kirupa.com/t/memory-leaks-with-photoshops-javascript/156979 "2005-07-29T05:38:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PSahuc](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@PSahuc](https://forum.kirupa.com/u/PSahuc)\
**Post date:** [July 29, 2005, 5:38am UTC](https://forum.kirupa.com/t/memory-leaks-with-photoshops-javascript/156979/1 "2005-07-29T05:38:44Z")

</div>

[size=2]Looking at the Photoshop javascript tutorials, I noticed that the author makes a point of assigning the variables back to null, after being done with them.

I have been working on a script similar to the yearbook example.

I have quite a few pages to process, and photoshop seems to get bogged down half-way through, due to memory issues, I believe. There is nothing wrong with the data.  
I am not nullifying the variables, at the moment, since I assume that if they are defined within an expression or a function, they get nullified automatically.

I am suspecting that there may be some memory leaks in Photoshop CS2’s implementation of Javascript.

My question is: should I take the extra step of specifically nullifying all my variables after I am done with them (even though I shouldn’t have to)?

Did anyone run into similar problems?

[/size]
