Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 为什么Flash Builder 4.6 Profiler似乎泄漏字符串,而调试模式GC';如所料_Actionscript 3_Flash_Flash Builder - Fatal编程技术网

Actionscript 3 为什么Flash Builder 4.6 Profiler似乎泄漏字符串,而调试模式GC';如所料

Actionscript 3 为什么Flash Builder 4.6 Profiler似乎泄漏字符串,而调试模式GC';如所料,actionscript-3,flash,flash-builder,Actionscript 3,Flash,Flash Builder,在对我的类进行单元评测时,我注意到String类无休止地累积(在我的大型应用程序中占用了超过90%的内存)。幸运的是,这只是在FlashBuilder4.6的探查器模式下运行。在调试或部署(如空中)中,使用嵌入式屏幕内存profilier(Mr Doobs Stats)使内存使用量达到预期水平 为了验证这一点,我制作了一个测试应用程序,它只是一个URLLoader,不断加载一个文本文件。在Profilier模式下使用URLLoaderDataFormat.String运行时,字符串数据永远不会被

在对我的类进行单元评测时,我注意到String类无休止地累积(在我的大型应用程序中占用了超过90%的内存)。幸运的是,这只是在FlashBuilder4.6的探查器模式下运行。在调试或部署(如空中)中,使用嵌入式屏幕内存profilier(Mr Doobs Stats)使内存使用量达到预期水平

为了验证这一点,我制作了一个测试应用程序,它只是一个URLLoader,不断加载一个文本文件。在Profilier模式下使用URLLoaderDataFormat.String运行时,字符串数据永远不会被GC'd并持续增长,而使用URLLoaderDataFormat.BINARY时,数据几乎立即被GC'd并保持水平

我不太愿意称之为bug,因为这可能是Profilier工作方式的必要部分……但对于Profiler来说,这可能是不正常的?这是我调查的要点

无论如何,这对我来说是几天的工作日,所以如果你在Google中想知道为什么String类正在疯狂地增长,而且从来没有GC会考虑测量你的应用程序外部的内存使用来验证。在我的例子中,我被误导了,认为我在主字符串方面遇到了一些问题——尽管最好理解主字符串及其对内存的影响(),但不要像我那样受到误导