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

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

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
Posted in Jira

We want to hear from you! How do you use Slack and Atlassian together?

Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...

85 views 1 5
Join discussion

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