GC Button in main screen

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
A

Arid

Guest
Hey Guys,
I noticed again and again... Minecraft with the FTB Infinity Pack takes so much RAM.
Because I'm a programmer I know, that java likes to hold its memory. But I also know, you can execute the garbage collector manual. Wouldnt solve a gc button in main screen the problem, to avoid this big memory lacks ?
I mean, I DO NOT want to restart Minecraft with the Modpack again and again to delete not needed trash in my memory....
Feel free to argue xD

PS:
I allready had experience with functions which needed a manual excecution of the garbage collector!
(Short time fourier transformations)
 

jikuja

legacy FTB Launcher developer
Launcher Developer
Global Moderator
Dec 17, 2013
1,134
111
99
How does GCing solve memory problems if memory is actually used for something?

What do you mean by main screen launcher or MC? What interfaces do you suggest to use for communication between MC client and launcher?
 
Last edited:
A

Arid

Guest
In Minecraft main screen
Fact is, that we have trash in the memory. Things we don't need but java doesn't knows, right? Then my idea to solve this problem with a manual gc execution won't work...
Solution would be to look wheter some variables in the java code of the mods aren't needed anymore etc...
 

jikuja

legacy FTB Launcher developer
Launcher Developer
Global Moderator
Dec 17, 2013
1,134
111
99
Please read some basic java GC documentations... ( When does java run gc? When does GC remove object from heap? Why System.gc() does not always free memory? Will java free unused allocations back to OS if heap size decreases? )

How would third party coder know which objects are still used by the mods or MC?
If mod retains references to objects which are not needed it's mod authors' fault. Profile memory usage and file bug reports.