如何阻止Android的垃圾收集器?可能吗? [英] How do i stop the android garbage collector? Is it possible?
本文介绍了如何阻止Android的垃圾收集器?可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法阻止垃圾收集器在一段时间?
Is there any way to stop the garbage collector for some time?
推荐答案
我猜你愿意,以避免越来越滞后的GC。 如果是这样的话,你的问题是类似于<一href="http://stackoverflow.com/questions/2484079/how-can-i-avoid-garbage-collection-delays-in-java-games-best-practices">this之一。
I guess you are willing to avoid getting lagged by the gc. If this is the case, your question is similar to this one.
基本上你不能阻止GC,但你可以使用强制呼叫的System.gc()
。
Basically you can't stop the gc but you can force a call using System.gc()
.
这篇关于如何阻止Android的垃圾收集器?可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文