When System.runFinalization use () and System.gc ()? [java program] [gc]
Q: Hi, When I System.runFinalization
() and System.gc () into a Java program? Thanks in advance!
Re:No, you should probably leave the Java virtual machine to its own garbage collection devices rather than force a full garbage collection cycle. Unless you are writing something that is allocating extremely large amounts of memory, there is no need to force a garbage collection.
Re:So should I use them together ??
Re:So …. do u like these functions ?? Tell me….
Re:because some people like the control.
Re:Then why Java still offering this function ?? Thanks a lot for your valuable comment !!!!
Re:You shouldn't have to for most applications. The Java VM does a pretty good job cleaning up after itself automatically.
Related posts
Tags: gc, java program