Reducing Browser Memory Leaks-GoogleMaps/API/doc/APIoverview/07-MemoryLeaks-N☆E 学習帳

[ リロード ]   [ ソース ]  [ トップ | 一覧 | 単語検索 | 最新 | バックアップ | ヘルプ ]

Counter: 3135, today: 4, yesterday: 0

Reducing Browser Memory Leaks

http://www.google.com/apis/maps/docu­mentation/

Version 2 (2006.4) 新規

The Google Maps API encourages the use of function closures, and the API event handling system GEvent attaches events to DOM nodes in such a way that almost inevitably causes some browsers to leak memory, particularly Internet Explorer. Version 2 of the Maps API introduces a new method, GUnload(), that will remove most of the circular references that cause these leaks. You should call GUnload() in the unload event of your page to reduce the potential that your application leaks memory:

<body onunload="GUnload()">

Using this function has virtually eliminated Internet Explorer memory leaks in Google Maps, though you should test for memory leaks on your own site using tools like Drip if you are noticing memory consumption problems.

これで IE での不具合が解決! :)
でも GUnload() は強制的にメモリを解放しているだけだろうから、根本的な解決はIEの次期バージョンを待つ必要があるんでしょうネ

参考

Drip → http://www.outofhanwell.com/ieleak/
DOM オブジェクトとメモリリーク: Days on the Moon → http://nanto.asablo.jp/blog/2005/12/­04/165848