Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] No more handles in SWT, can this number be configured?


~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 15 Apr 2021 at 15:27, Alex Blewitt <alex.blewitt@xxxxxxxxx> wrote:
On 15 Apr 2021, at 19:31, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:

On Thu, Apr 15, 2021 at 6:09 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:


Would be nice to be able to ask SWT at runtime for the currently
allocated handlers so that we can be a bit more reactive to the
currently available handlers instead of just using a hard-tab limit.

Display.getDeviceData().objects?
https://help.eclipse.org/2021-03/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Findex.html

This only returns a value if tracking has been enabled, and it adds a significant overhead. It’s useful for tracking down some leaks but wouldn’t recommend using it for an application in real use. In any case, the set of objects here don’t necessarily tell you how many handles are being used by the OS, although to a first-order approximation you could guess on a 1-1 mapping.

https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/163437 adds DeviceData#getAllocatedResourceCount which returns number of allocated devices without the overhead of objects, nor needing tracking to be on.

HTH,
Jonah

 

Alex
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev

Back to the top