作者TonyQ (骨头)
看板Ajax
标题Re: [请益] JavaScript Memory Leak
时间Tue Mar 20 22:18:07 2007
※ 引述《TonyQ (骨头)》之铭言:
: 简单来说就是JavaScript所造成的记忆体残留。(没被释放)
: 我怕我的叙述不够清楚,所以找了一个说明页。
: http://www.barelyfitz.com/screencast/javascript/memory-leak/
装了leak monitor (Fx plug-in)之後,
确认leak来源是在 urMap Api中(後附report),
trace code看了一个小时,觉得要找出问题这点实在非我能力可及。orz
而且就算找出问题也要urMap才能解决。(烟)
只好先不理它了。
对於相对应的处理措施,
IE 只要把视窗最小化,就会自动做GC动作。
Fx 则是需要做一点最佳化的工夫才会这样作。
至於PCMan...还没试过,先不理它。XD
虽然有点糟糕的解法,不过也只能将就。
谁叫urMap的中文路名,有它的不可取代性......>"<
────────────────────────────────
Leaks in window 0x1e0c568:[+] [leaked object] (2726950,
http://www.urmap.com/api/script/1.06/urmap1.06.js, 5-5) = [Function] [ ]
prototype (1d344d0) = [Object][+] [leaked object] (2726958,
http://www.urmap.com/api/script/1.06/urmap1.06.js, 5-5) = [Function] [ ]
prototype (1d344f0) = [Object][+] [leaked object] (2726970,
http://www.urmap.com/api/script/1.06/urmap1.06.js, 5-5) = [Function] [ ]
prototype (1d34500) = [Object][+] [leaked object] (27269b8,
http://www.urmap.com/api/script/1.06/urmap1.06.js, 5-5) = [Function] [ ]
prototype (1d34518) = [Object][+] [leaked object] (2726870,
http://www.urmap.com/api/script/1.06/urmap1.06.js, 5-5) = [Function] [ ]
prototype (26ddd80) = [Object][+] [leaked object] (2726960,
http://www.urmap.com/api/script/1.06/urmap1.06.js, 5-5) = [Function] [ ]
prototype (1d34538) = [Object]
--
I am a person, and I am always thinking .
Thinking in love , Thinking in life ,
Thinking in why , Thinking in worth.
I can't believe any of what ,
I am just thinking then thinking ,
but worst of all , most of mine is thinking not actioning...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.27.68