Huge amount of data in vectors will not be released #13372
Labels
C-Bug
An unexpected or incorrect behavior
S-User-Error
This issue was caused by a mistake in the user's approach
Bevy version
0.13.2
The release number or commit hash of the version you're using.
What you did
Calling this function (only from a bevy context, a menu button for example) causes the "big_stuff_vector" to take up memory, even it is never being used.
It contains about 1-2 GB of fairly deeply nested structures. It contains no pointers or references, or anything else like that. Only standard bevy enums/structs. There is no global variables referencing any of it.
After running this code 3-4 times, the computer runs out of memory and crashes.
I found a workaround, by using "mimalloc" as global allocator. This however would not run without crash unless I disabled dynamic_linking in Cargo.toml, so not the best workaround.
The text was updated successfully, but these errors were encountered: