It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Groovy Dynamic Memory Allocation ----- Deallocation

JamesR Jan 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

1 vote
Answer accepted
JamieA Jan 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 Feb 03, 2013

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

1 vote
Jozef Kotlár Jan 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 Jan 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

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

951 views 12 15
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you