java. Lang. outofmemoryerror: Java heap space when using this short program to delete the title bar

I found this code on stackoverflow to display the full screen color in Matlab:

The problem is that once I run the program five times, an error occurs:

Now, I can increase the heap space, as described here

But since my application has to run for a long time, is there a way to clear the heap space every time I run the script? In this way, I don't have to allocate more heap space memory and will eventually run out

Solution

Well, if you don't mind blowing everything away, you can always make a "clear Java"

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>