Open IXLLEGACYIXL opened 1 month ago
This image shows some of the instances retained after selecting two different assets:
AssetRootNodePresenter
seems like a good start, it likely is rooted somewhere and prevents its references from being collected. Here are the root paths for one of the two retained AssetRootNodePresenter
:
So, all of the links to the node at the top should have released their reference to it but haven't for some reason. I don't have time to look into it further than this right now, so I'll leave it for now
We have a previous/next system (based upon the undo/redo stack) which records selection of items in asset view or in scene hierarchy, so it is expected to have slight increase in memory when changing selection.
the memory increasse is 6-7mb per click in the hierarchy, i didnt click often to reach 1gb of memory
it would make more sense to release the UI on click and on undo go back to the previous UI and build the UI again overall in gamestudio its a problem that nothing is getting released
it would make more sense to release the UI on click and on undo go back to the previous UI and build the UI again
I have no idea what you mean by that.
lets say the method exists "BuildUiOnHierarchyClick"
currently you click, BuildUiOnHierarchyClick(target) runs, you click again, the UI gets stored in the undo command
instead of storing the entire UI in the UI command you can just store BuildUiOnHierarchyClick(previousTarget) , so if you undo you build the previous UI again, instead of storing the entire UI
There is no such thing, that's not how the undo/redo system works. It doesn't store anything related to UI.
With that said, the leaks are likely not in the scene editor itself but on the property grid (and/or quantum nodes). I can reproduce an increase in memory by switching between selecting a Scene asset and the GameSettings asset in the asset view.
With that said, the leaks are likely not in the scene editor itself but on the property grid (and/or quantum nodes). I can reproduce an increase in memory by switching between selecting a Scene asset and the GameSettings asset in the asset view.
a slight increase would be reasonable but 7mb per click is a little bit too much
Release Type: Official Release/GitHub (please choose appropriate option) 4.2
Describe the bug The Editor has a memory leak in the assethierarchy or something that is connected to it
To Reproduce Steps to reproduce the behavior:
Expected behavior The memory usage shouldnt just increase by clicking in the scene hierarchy
Screenshots
![grafik](https://github.com/stride3d/stride/assets/107197024/c827c105-7f7f-4cce-9cba-6926ab5e6ca1)