Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:45 Go to next message
Rune  is currently offline Rune Friend
Messages: 4
Registered: October 2010
Junior Member
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 08:32 Go to previous messageGo to next message
Viorel Hojda is currently offline Viorel HojdaFriend
Messages: 10
Registered: July 2009
Junior Member
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 11:29 Go to previous messageGo to next message
Rune  is currently offline Rune Friend
Messages: 4
Registered: October 2010
Junior Member
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 15:51 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
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: Thu Apr 15 12:02:57 GMT 2021

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

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

Back to the top