Skip to content

How to release the momory used to load scenes? #1171

Answered by merlinND
Galaxeaaa asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure, it's difficult to tell from the stack trace. The clean_up() function is very aggressive and will lead to segfaults if anything from the previously loaded scene is still referenced or used in any way.
So I would try to make sure that everything is out of scope (including no "hidden" references via an AD graph) before calling it.

You can also try commenting out different parts of the clean_up() function to see if it's enough to reclaim memory while being less aggressive.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@merlinND
Comment options

Answer selected by njroussel
@njroussel
Comment options

@Galaxeaaa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants