分析 AS3 项目中的内存
我有一个 AS3 项目,在使用 Mr. Doob 的分析器时,我发现内存使用量每秒都在增加。我怎样才能查出泄漏是从哪里来的?我正在寻找不涉及 Flash Builder Professional 的解决方案。
I have an AS3 project and while using Mr. Doob's profiler I see that memory usage keeps rising with every second. How can I find out where the leak is coming from? I'm looking for a solution that doesn't involve Flash Builder Professional.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它会不断上升,还是会下降?
如果您使用的是 FlashDevelop(免费),则可以将其设置为在测试 SWF 时打开一个分析器面板。该面板有 3 个选项卡:内存、活动对象计数和对象。您可以使用活动对象计数来了解当前活动的对象。如果您看到一种类型的对象不断上升而从不下降,则说明存在泄漏。
Does it keep going up and up, or does it ever drop?
If you're using FlashDevelop (free), there's a profiler panel that you can set to turn on when you test your SWF. That panel has 3 tabs: Memory, Live Objects Count, and Objects. You can use the Live Objects Count to get an idea of what's currently alive. If you see one type of object continuously going up and never going down, then you've a leak.
我不知道 Mr Doob 的分析器,但是如果您尝试 FlashDevelop 您也许能够同时拥有类实例的数量并监视它们的创建。在我看来,一个好的分析器应该包含这种功能。
I don't konw Mr Doob's profiler, but if you try FlashDevelop's you may be able to have the number of class instances at a moment and monitor their creation. In my opinion a good profiler should include this fonctionnality.