Q5. How can you force garbage collection?
你能强制执行垃圾回收吗?
It also provides a toolbar button to force the JVM to perform garbage collection when desired.
它还提供了一个工具栏按钮,必要时可以强制JVM执行垃圾收集。
If you allocate objects in a user interface loop, you will force a periodic garbage collection, creating little "hiccups" in the user experience.
如果在用户界面周期内分配对象,就会强制一个周期性的垃圾回收,给用户体验增加小小的停顿间隙。
Note that when using derived classes, it is not enough, from a security perspective, to simply force a garbage collection after you have finished using the object.
注意,当使用派生类时,从安全的角度考虑,仅在使用完对象后强制垃圾回收是不够的。
Note that when using derived classes, it is not enough, from a security perspective, to simply force a garbage collection after you have finished using the object.
注意,当使用派生类时,从安全的角度考虑,仅在使用完对象后强制垃圾回收是不够的。
应用推荐