Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
destroyDrawingCache() 操作昂贵吗?
如果你buildDrawingCache()手动调用而不调用setDrawingCacheEnabled(true),你应该通过调用来清理缓存destroyDrawingCache()。
buildDrawingCache()
setDrawingCacheEnabled(true)
destroyDrawingCache()
您应该避免在启用硬件加速时调用此方法。如果不需要绘图缓存位图,调用此方法会增加内存使用并导致视图在软件中渲染一次,从而对性能产生负面影响。