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

examples: fix leak in examples/sokol/particles/, by marking s.pool and s.bin with .noslices

This commit is contained in:
Delyan Angelov 2022-02-03 18:52:52 +02:00
parent 85d36ed231
commit 89d399b035
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -19,6 +19,8 @@ mut:
}
pub fn (mut s System) init(sc SystemConfig) {
unsafe { s.pool.flags.set(.noslices) }
unsafe { s.bin.flags.set(.noslices) }
for i := 0; i < sc.pool; i++ {
p := new(vec2.Vec2{f32(s.width) * 0.5, f32(s.height) * 0.5})
s.bin << p