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.
如果在用户界面周期内分配对象,就会强制一个周期性的垃圾回收,给用户体验增加小小的停顿间隙。
应用推荐