Instances of NatTable are beeing kept in memory after composite is disposed [message #1818542] |
Thu, 19 December 2019 03:07  |
Eclipse User |
|
|
|
Hey guys,
during working with NatTable, I noticed a memory problem in my application and after further investigation in your NatTable Example application as well:
The NatTable instances are not becoming eligible for garbage collection when the parent composite is disposed and/or nattable#dispose is called. The worse part is, that even the input data from the table are not released (You can prevent this by setting an empty input during disposing).
Profiling with VisualVM has identified the NatTableElementAdapter as the class which holds a reference to the table.
This situation is reproducable with most of the examples in your tutorial. In one case (Tutorial Examples -> Configuration -> NatGridLayerPainterExample) the instance is removed from memory, but only if it wasn't the first instance created. And I couldn't identify a patern, when or why this example is removed but the others are not.
I appended the heap dump from the very first example (Tutorial Examples -> Data -> CustomDataProviderExample) after I opened this example, disposed the tab and perfomed GC with VisualVM.
Kind regards,
Henning
|
|
|
Re: Instances of NatTable are beeing kept in memory after composite is disposed [message #1818832 is a reply to message #1818542] |
Mon, 30 December 2019 03:26  |
Eclipse User |
|
|
|
The NatTableElementAdapter is part of the E4 CSS implementation for NatTable. Interestingly the most examples do not use CSS styling, so I wonder why an instance of NatTableElementAdapter is created for those examples.
I need to check what the issue with the CSS implementation is. If you are not using the E4 extension I think the easiest way would be to not include the E4 extension in your application.
|
|
|
Powered by
FUDForum. Page generated in 0.03749 seconds