forTEXT / catma

Computer Assisted Text Markup and Analysis
https://www.catma.de
GNU General Public License v3.0
89 stars 8 forks source link

CommentListener causes Memory Leak #300

Closed mpetris closed 2 years ago

mpetris commented 2 years ago

Describe the bug In the TaggerView of the Annotate Module on loading a Document a CommentListener is registered in Hazelcast for the Comments-Topic on that Document. That CommentListener keeps registered even after closing the TaggerView. Since the CommentListener maintains a reference on the Project itself, the whole Project is kept from being GCed after closing the Project.

To Reproduce Steps to reproduce the behavior:

  1. Check instance count of GraphWorkTreeProject
  2. Open a Project
  3. Open a Document
  4. Close Project
  5. Check instance count of GraphWorkTreeProject

Expected behavior Instance count should be the same as before opening the Project.

mpetris commented 2 years ago

Some CommentListeners doesn't get removed, probably on session destroy.