4

I found this piece of code on stackoverflow for displaying a fullscreen colour in MATLAB: Remove titlebar from MATLAB GUI for full screen display

The problem is that once I've run the program 5 times, there is an error that shows up:

??? Java exception occurred: java.lang.OutOfMemoryError: Java heap space" error that shows up.

Now, I could increase heap space like it is described here

But since my application has to run for long periods of time, is there a way I can clear the heapspace each time the script is run? In this way, I won't have to allocate more heapspace memory and have that run out eventually as well.

Community
  • 1
  • 1
mersenne31
  • 51
  • 1
  • 3

1 Answers1

1

Well, you could always just do a "clear java" if you don't mind blowing away everything.

Christopher Barber
  • 2,548
  • 1
  • 22
  • 23