Details
Description
A forum user first commented on memory exceptions with the viewer RI and I as able to the verify the problem with a heap of 64m and a large file. I'll put in more detail below but there are few spots where we where not unregistered , keyboard, focus and mouse events.
The main cause of the memory leak was related to the CurrentPageChanger's addMouseListenerToAnyButtonsIn() method call. I can't find any documentation on this method but the listener call as adding mouse listeners to any sub components of the vertical and horizontal scroll bar.
I all reintroduced the dispose() call for annotation components so that annotation component could unregister any listeners.
These two issue plus a couple other minor issue was causing the soft and week references from not be garbage collected. This issue was limited to the viewer RI and core appears to be unaffected by this issue.