Hi,
when i create a lot of items with my Scriptographer script, at some point i get an error that tells me that java ran out of heap space.
com.scriptographer.ai.Tool.onHandleEvent(Tool.java:309) OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space OutOfMemoryError: Java heap space
how can i deal with it? By now i see two options:
First: Increase heap space
Is there any way to simply increase the heap space? (i know this doesnt solve the problem it's just delaying it)
Second: better programming
how can i remove items from the heap to create more space? By now i delete items i don't need anymore by removing the path and removing the Object that holds this path (i need those Objects)
Is there anything i can do additionally?
How about javas garbage collection? Is there a way to trigger it manually? More important: would that make any sense?
best regards,
Axel