From 89d399b03563ac288e95f4b586973c3bea906bc0 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 3 Feb 2022 18:52:52 +0200 Subject: [PATCH] examples: fix leak in examples/sokol/particles/, by marking s.pool and s.bin with .noslices --- examples/sokol/particles/modules/particle/system.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/sokol/particles/modules/particle/system.v b/examples/sokol/particles/modules/particle/system.v index 4f0382beff..a1573abb03 100644 --- a/examples/sokol/particles/modules/particle/system.v +++ b/examples/sokol/particles/modules/particle/system.v @@ -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