moosetechnology / MooseIDE

New Tools for Moose
MIT License
8 stars 25 forks source link

Major memory leak - impossible to unload a model #406

Open badetitou opened 2 years ago

badetitou commented 2 years ago

How can we remove a model from the memory?

After importing a model, I saw that there are errors in it. So, I regenerated another one and I tried to remove the previous one.

But, how to remove a model? (and free the Pharo memory!)

I tried

  1. remove the model from the Models Browser (model > utility > delete) -> There are still references
  2. remove the model from the logger -> there are still references

I don't know what I can do more? the model is stuck at some place in a bus I can see it when I open a new browser (such as query browser or inspector).

In my opinion, this is a major bug that we should fix as soon as possible.

NicolasAnquetil commented 2 years ago

Not an easy one:

We could look at the solutions offered by Pharo (like weakReferences), or when deleting a model, we could browse through all its entities to remove the back pointer form the entity to the model ...

fuhrmanator commented 2 years ago

With TypeScript (certainly inconsistent!) models I see I can't delete them at all. Is that a different bug?

image

NicolasAnquetil commented 1 year ago

@fuhrmanator yes, this is something else see #711

anneetien commented 2 months ago

@ClotildeToullec @jordanmontt please have a look.