Is it part of either the CLI or the Controller api?
Is there a recommended way? Or do users roll their own using jcmd, a utility jar, or System.gc?
It would be nice if there was a simple way baked into the product
Is there a means of forcing GC baked in?
-
- Posts: 34
- Joined: Mon Feb 02, 2015 3:14 pm
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Is there a means of forcing GC baked in?
The recommended way to deal with GC is to let the JVM decide when and whether to run it. Modern JVMs do not need user's assistance in this regard.
Anyway, you may force GC if you want to. Use any tool you like, the result will be the same:
- the profiler UI has a dedicated toolbar button;
- the profiler API class Controller has method forceGC() (but the command line tool does not have a command for this);
- you can use standard tools like jconsole, etc.
Anyway, you may force GC if you want to. Use any tool you like, the result will be the same:
- the profiler UI has a dedicated toolbar button;
- the profiler API class Controller has method forceGC() (but the command line tool does not have a command for this);
- you can use standard tools like jconsole, etc.