Groovy Dynamic Memory Allocation ----- Deallocation

JamesR January 30, 2013

JIRA v5.2.2 Standalone

Question: With Groovy, is there a need to deallocate or free-up any dynamically allocated multi-dimensional arrays or collections? If so, can you provide any guidance? Please accept my apology if this is a question that reveals my inexperience.

Thanks for your consideration.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

As Jozef said it's not anything you need to worry about, unless you have memory problems. You'd have to try quite hard to prevent stuff getting garbage collected.

JamesR February 3, 2013

Hi Jamie --- thanks so much for this! Have a great week!

1 vote
Jozef Kotlár
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

I would say it is the same as in Java. See also this article about GroovyShell.

If your scripts are run in context of Scriptrunner, they are executed using eval() function and therefore only bindings variables would survive the single execution.

JamesR January 31, 2013

Jozef, thank you so much for this guidance -- and the links are exactly what I need. You read my intentions well (Scriptrunner context). Thanks again

TAGS
AUG Leaders

Atlassian Community Events