Garbage collection does indeed obviate the need for explicit resource deallocation, most of the time. (I'll discuss some exceptions in a future column.)
大多数情况下,垃圾收集确实消除了显式资源存储单元分配(explicit resource deallocation)的必要(在以后的专栏中我将讨论一些例外)。
Logging GC usage is not intrusive, and so it is reasonable to enable GC logging in production by default in the event you ever need to analyze memory problems or tune the garbage collector.
记录GC使用情况并不具有干扰性,因此如果需要分析内存问题或者调优垃圾收集器,在生产环境中默认启用gc日志是值得的。
The result is that garbage collection will need to be performed in order to reclaim space in the heap.
结果是需要执行垃圾收集以便回收堆中的空间。
应用推荐