Opened 5 years ago

Closed 5 years ago

#100 closed defect (fixed)

Plugin leaks memory

Reported by: dmik Owned by:
Priority: major Milestone: 0.4.2
Component: wrapper Version: 0.4.1
Severity: medium Keywords:


While working on #99, I found a bunch of memory leaks in the plugin by coincidence. When the plugin is initialized, it creates a bunch of stubs for both plugins callbacks and netscape callbacks (to switch between Win32 and OS/2 contexts). However, these stubs are never freed, each plugin instantiation creates a new set. It's around 1KB per instance. Not much, but given alignments and such it may become several MB after a long browser session that involves a lot of flash elements.

Change History (3)

comment:1 Changed 5 years ago by dmik

The leaked memory is allocated here: and here:

To fix these leaks, we need to reorganize code in a way which is also necessary to complete a fix for #99. So I will work on this first.

comment:2 Changed 5 years ago by dmik

This defect and #66 may have the same root. Needs re-checking after fixing.

comment:3 Changed 5 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

Refactored the existing code in r119. This fixes the memory leaks and makes code much cleaner and ready for #99.

Note that I over-estimated the amount of leaks. Plugin initialization/shutdown happens only once per browser session IIRC and it is not to be intermixed with plugin instance creation (which happens many-many times — each time a page with Flash is opened/reloaded). For this reason I don't think that it's related to #66 any more.

Note: See TracTickets for help on using tickets.