Groovy Dynamic Memory Allocation ----- Deallocation

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

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.

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

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Summit

Find a your Summit 2019 Buddy!

Can you believe there's less than one month until Summit 2019? It's time to start planning your agendas, not to mention packing ... In the meantime, introduce yourselves on this thread so that you ...

232 views 15 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you