我们的游戏在ios上内存增加导致游戏闪退


#1

使用hxcpp 4.0.8版本,openfl 8.7,加载资源到内存释,最终放不了,导致游戏崩溃


#2

作为同胞,我建议哥们你描述问题最好详细一些 :joy:


#3

Can’t find the problem, the compiled game, Android and other platforms will not be able to release memory due to memory problems.


#4

You may not know that the Assets class caches resources by default. For example:

var bitmapData = Assets.getBitmapData ("image.png");
bitmapData = null;
trace (Assets.cache.hasBitmapData ("image.png")); // true

Call Assets.cache.removeBitmapData() or Assets.cache.clear() if something is cached

Also, weak event listeners are not implemented because they are not supported on all platforms, so make sure you remove event listeners to allow objects to be garbage collected.