1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

stbi: fix memory leak from stbi.load/1 with GC (#16028)

This commit is contained in:
Wertzui123
2022-10-11 14:19:36 +02:00
committed by GitHub
parent 34f233c93f
commit 5047058595
4 changed files with 69 additions and 1 deletions

View File

@ -263,6 +263,15 @@ fn get_all_commands() []Command {
rmfile: 'v.c'
}
}
$if linux {
res << Command{
line: '$vexe vlib/v/tests/bench/bench_stbi_load.v && prlimit -v10485760 vlib/v/tests/bench/bench_stbi_load'
okmsg: 'STBI load does not leak with GC on, when loading images multiple times (use < 10MB)'
runcmd: .execute
contains: 'logo.png 1000 times.'
rmfile: 'vlib/v/tests/bench/bench_stbi_load'
}
}
$if !windows {
res << Command{
line: '$vexe -raw-vsh-tmp-prefix tmp vlib/v/tests/script_with_no_extension'