ActiveX Browser Memory Leak

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

Ludek
Posts: 5114
Joined: Fri Mar 09, 2007 9:00 am

Re: ActiveX Browser Memory Leak

Post by Ludek »

GIL wrote:wait, 3?
You mean open and close the window 3 times?

Because that's too little, just leave it there literally a couple o minutes
Yes, open and close the window 3 times => 3 MB leak on Win 7.

Left it for 5 minutes => further 4 MB leak
i.e. 26 KB per attempt in avarage.
It always oscilates between 41MB and 44MB on each attempt and sometimes there is X KB leak, sometimes there isn't.

It is strange that it is indeed Windows 7 related. So it seems to be a leak in Win 7 IE. We use memory manager (for leak detection) in IDE when developing and it doesn't detect the leak.
ZvezdanD
Posts: 3270
Joined: Thu Jun 08, 2006 7:40 pm

Re: ActiveX Browser Memory Leak

Post by ZvezdanD »

I am late for this discussion, but I think I could tell you some observations. I am working on the next version of Tree Report for Child Nodes add-on. The current public implementation is using Web Browser ActiveX with some freeware treeview JavaScript which is called from HTML page. That script is not optimal for large number of nodes, so I want to replace it. I am currently in benchmark phase with several another free treeview Javascripts. One of them has terrible memory leak which raises with number of nodes. I tried with my Location node and its sub-nodes, approx. 20,000 nodes, and I am getting next values for free RAM after closing the dialog box with the ActiveX control: 303 -> 252 -> 227 -> 199 MB. With another two Javascripts that I am trying I don't have such leaks. Testing within Windows XP SP2.

So, maybe you could try your script example with another Web site. Maybe Google which you tried has some Javascript that has leaks. You could take a look at Microsoft article about IE leaks caused by Javascripts: Understanding and Solving Internet Explorer Leak Patterns, also this: JavaScript and memory leaks.

By the way, MM versions older then 3.1.0.1205 had memory leaks after closing dialog boxes, especially with ActiveX controls, even without any Javascripts (I already reported that). To resolve that I am using Script.UnRegisterHandler "wbCtrl_OnChange" and for even older versions which don't have UnRegisterHandler I am using Script.UnRegisterAllEvents, but with it in some cases I need to re-register all needed events again. Unfortunately, UnRegisterHandler and UnRegisterAllEvents cannot resolve problem with the mentioned Javascript that I tried.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Post Reply