[Ide] Fix memory leak when reloading solutions