Flex memory limit - how to configure

杀马特。学长 韩版系。学妹 提交于 2019-12-24 01:36:37

问题


Can I control the memory limit (i.e. when GC has to run) in my Flex application?


回答1:


I don't think so. That is probably a parameter of the flash player based at the client, and I assume it is also dependant on the exact resources the client machine has, i.e. more RAM means less frequent gc, etc.




回答2:


Check out the flash.system.System class. The "totalMemory" property will show you (in bytes) how much memory the current application is using. Calling System.gc() will run a GC. You could use a Timer to periodically check totalMemory and then preform gc if it exceeds a threshold. More info:

http://livedocs.adobe.com/flex/3/langref/flash/system/System.html




回答3:


I am not 100% sure, but I believe the answer is no. Read this article.



来源:https://stackoverflow.com/questions/560510/flex-memory-limit-how-to-configure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!