Community
Participate
Working Groups
The ClickDrackGesture class contains a private field 'scenes' of type Set<Scene> which is never cleared on deactivation or dispose. As a result the memory bound by the scene nodes is not released. Additonally, the weak references in AdaptableScope class field 'scopedInstances' could not removed by the garbage collector in this case. If you overwrite ClickDragGesture::doDeactivate() function in a subclass and access and clear the 'scenes' set by reflection, the memory is released.
Additional insights: - JavaFX Scene maintains dirtyNodes that are not cleared when a GEF application is closed inside Eclipse. - As a workaround, you could use reflection to clear that array. However, it should be possible to clear it by use of other means, e.g. potentially by setting a new scene root, a new scene, or calling some method that triggers JavaFX clean up, e.g. possibly snapshot().