IE内存泄漏,如何解决? [英] IE memory leak, how to resolve?

查看:86
本文介绍了IE内存泄漏,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个ajax聊天应用程序,完成了大部分工作但是当我在IE上测试它时(在IE6和IE7上),发现存在内存泄漏。该应用程序在FF上运行良好。我该如何解决这个问题?


我用以下方式使用了ajax(这与我在聊天应用程序中使用ajax的方式类似);第34行的incrementer.php文件只是打印会话中增加的值

I am working on an ajax chat application, done most of the work but when i tested it on IE (both on IE6 and IE7), found that there is a memory leak. The application works fine on FF. How can i fix this?

I have used ajax in the following way (this is a similar to how i am using ajax in my chat application); incrementer.php file on line # 34 simply prints an incremented value from the session

展开 | 选择 | Wrap | 行号

推荐答案

1毫秒有点太小了,不是吗?


尝试使用像IEDrip这样的东西来检测泄漏。它通常是由循环引用引起的,尤其是闭包 - 请参阅链接
1 millisecond is a bit too small, isn''t it?

Try using something like IEDrip to detect the leak. It is often caused by circular references, particularly closures - see link.



1毫秒有点太小了,不是吗?


尝试使用像IEDrip这样的东西来检测泄漏。它通常是由循环引用引起的,尤其是闭包 - 请参阅链接



感谢您的回复。将间隔设置为1毫秒我可以看到内存使用的快速增加。


我无法在代码中跟踪循环引用。如果有,请指出&以及如何解决这个问题

Thanks for your reply. Setting the interval to 1 millisecond i can see quick increase in the use of memory.

I am unable to trace circular reference in my code. If there is any, please point to that & and how can i resolve this


我找到了一个导致另一个问题的解决方案。解决方案如下,我已经摆脱了内部功能(参见第38行)。现在第28行出现错误,因为我无法访问 updateText 中的变量''a''问题是如何在 updateText <中访问变量''a'' / b> function。
I have found a solution which leads to another problem. The solution is given below, i have got rid of inner function (see line # 38 ). Now there is an error at line# 28 as i have no access to variable ''a'' within updateText The problem is how can i access variable ''a'' in the updateText function.
展开 | 选择 | Wrap | 行号


这篇关于IE内存泄漏,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆