The ChangeRecorder kept a collection of existing elements after closing it. If the recorder is still referenced somewhere, these elements are kept in memory requiring large amounts of memory (as this affects all elements monitored by the recorder before). Now closing the view also cleans this collections.
The VirtualModel was registered at a central registry but not removed on dispose. Thus, the model with all its contents remained in memory. Now the model deregisters itself on dispose.
This PR fixes two memory leaks:
ChangeRecorder
kept a collection of existing elements after closing it. If the recorder is still referenced somewhere, these elements are kept in memory requiring large amounts of memory (as this affects all elements monitored by the recorder before). Now closing the view also cleans this collections.VirtualModel
was registered at a central registry but not removed on dispose. Thus, the model with all its contents remained in memory. Now the model deregisters itself on dispose.