Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Instances of NatTable are beeing kept in memory after composite is disposed
Instances of NatTable are beeing kept in memory after composite is disposed [message #1818542] Thu, 19 December 2019 08:07 Go to next message
Henning De is currently offline Henning DeFriend
Messages: 1
Registered: December 2019
Junior Member
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 08:26 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2815
Registered: July 2012
Senior Member
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.
Previous Topic:NPE while saving State (with Filters
Next Topic:Row height and icon scaling in Nattable with eclipse 19-09
Goto Forum:
  


Current Time: Thu Aug 05 22:08:19 GMT 2021

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

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

Back to the top