Bug 269173 - Provide a way to find leaked menus (in Sleak?)
Summary: Provide a way to find leaked menus (in Sleak?)
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 07:54 EDT by Markus Keller CLA
Modified: 2021-11-12 11:44 EST (History)
3 users (show)

See Also:


Attachments
Hack for Decorations to write leaked menus to stderr (4.45 KB, patch)
2009-03-18 07:54 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2009-03-18 07:54:26 EDT
Created attachment 129197 [details]
Hack for Decorations to write leaked menus to stderr

It's hard to find leaked (unreferenced and not disposed) instances of popup menus, since Sleak does not track Menus, and Decorations keeps a Menu[] with all popup menus that have been registered with a Shell.

I helped myself with a hacked version of Decorations that keeps the menus in WeakReferences and writes a stacktrace of their point of creation to stderr when they are garbage collected.

It would be nice if Menu leak detection could be built into SWT, maybe in the Sleak tool.

I'm attaching my hack to Decorations so that others could use it in the mean time (but not as a proposed implementation).
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:13:31 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.