I know this question was asked too many times to count, but the “latest” discussions about the topic I’ve found are about two years old, with many engine updates in between so, my questions are:
How to destroy widgets in order to avoid memory leaks;
Is garbage collection handling widgets when removed from parent and if it does, how often does it destroy them - is it a timer/based on a certain memory threshold/or a certain number of widgets?
The latest discussion on this was actually earlier this month. Here is the link to that question.
The post is old, but the 2 comments are from May and I also provide a link in that comment to a VERY in depth discussion I and 2 others had on this topic back in February of 2019. That link is here:
Long story short: if you want to remove the widgets from memory you must manually call “collect garbage”. Otherwise they stay in memory for the duration of the level.
Thank you for your answers, yea, I’ve read the discussions on manually calling garbage collection (and it’s downsides). I just thought things have changed meanwhile and the - what I consider to be - issue has been “solved”.