据我所知,Java没有任何管理内存的方法,因为整个内存管理都是由内置的自动运行的垃圾收集器完成的,这在某些情况下可能会有点低效。
我找到了这个网站,它告诉我们他们正在制作一个 java 工具和库,这些工具和库可以工作而不会产生任何垃圾。我想得到某种关于这怎么可能的逻辑解释。
最佳答案
http://www.coralblocks.com/index.php/2015/10/is-coralfix-the-fastest-and-easiest-to-use-fix-engine/
All Coral Blocks components produce zero garbage for the GC in the critical path.
我的猜测。预分配的缓冲区,没有 String
对象。正如他们所说:
At Coral Blocks we use Java as a syntax language. Our libraries have zero external dependencies and we don’t even rely on the JDK standard libraries. With CoralFIX you have total control over the critical path.
关于java - 如何避免在 Java 中产生垃圾?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37015399/