macroquad
macroquad copied to clipboard
`get_screen_data` leaks memory and is not deallocated when the program exits
Using macroquad 0.4.4:
use macroquad::prelude::*;
#[macroquad::main("BasicShapes")]
async fn main() {
loop {
get_screen_data();
next_frame().await
}
}
This will make memory usage grow very fast until it crashes the system.
Memory usage does not decrease by quitting the program, i had to use sudo zsh -c 'echo 3 >| /proc/sys/vm/drop_caches'. Using Kubuntu 22.04.
Same issue on Mac when using the get_screen_data() function in the loop. Memory does decrease on crash/quitting though.
This issue should have been closed by #666, no?