Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » GUI Resource Estimate(Getting Handle Count or other estimate of the amount of currently consumed native resources)
GUI Resource Estimate [message #655696] Tue, 22 February 2011 05:45 Go to next message
Eclipse UserFriend
We want to apply an automatic resource management strategy to manage GUI resources in our software.

To make effective decision about when to reclaim/dispose resources, we want some reasonable estimate of the size of resources consumed by each object tree and the available space.

The measure we use should be good enough, i.e. relatively reliable and easy to maintain. One of the candidate measures we are considering is the number of allocated handles.

* Is there a way to compute the number of handles held by an object tree?
* Is there a way to query the overall number handles held by the application?

Thanks!
Re: GUI Resource Estimate [message #656707 is a reply to message #655696] Mon, 28 February 2011 03:32 Go to previous messageGo to next message
Eclipse UserFriend
Take a look at Sleak : http://www.eclipse.org/articles/swt-design-2/sleak.htm It's a tool basically used for testing and finding unallocated/not disposed resources. Check the code inside and you will see that is very easy to get the number of handles and other related stuff. Hope it helps, I've used it a lot.
Re: GUI Resource Estimate [message #657014 is a reply to message #656707] Tue, 01 March 2011 06:29 Go to previous messageGo to next message
Eclipse UserFriend
Thanks! That is a great help!

One issue is that it seems to track only resources and not native widgets. Is there a similar way to track native widgets?
Re: GUI Resource Estimate [message #657677 is a reply to message #657014] Thu, 03 March 2011 10:51 Go to previous message
Eclipse UserFriend
Hi,

SWT does not have an equivalent tool for tracking widget handles, but since
everything's native, any tool that would be used to track widget handles in
a different context (eg.- a C++ app) should work equally well for SWT apps.

Grant


"Rune" <rug@maconomy.com> wrote in message
news:ikikum$8mk$1@news.eclipse.org...
> Thanks! That is a great help!
>
> One issue is that it seems to track only resources and not native widgets.
> Is there a similar way to track native widgets?
Previous Topic:Preventing resize of a popup with a resize border
Next Topic:SWT buttons internationalization
Goto Forum:
  


Current Time: Sat Jul 05 07:41:35 EDT 2025

Powered by FUDForum. Page generated in 0.15394 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top