vitruv-tools / Vitruv

View-based Development and Model Consistency Framework
http://vitruv.tools
Eclipse Public License 1.0
14 stars 19 forks source link

Fix memory leaks #486

Closed HeikoKlare closed 2 years ago

HeikoKlare commented 2 years ago

This PR fixes two memory leaks:

  1. 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.
  2. 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.