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

pull/13363/head
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
1 changed files with 2 additions and 0 deletions

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