examples: fix leak in examples/sokol/particles/, by marking s.pool and s.bin with .noslices
parent
85d36ed231
commit
89d399b035
|
@ -19,6 +19,8 @@ mut:
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut s System) init(sc SystemConfig) {
|
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++ {
|
for i := 0; i < sc.pool; i++ {
|
||||||
p := new(vec2.Vec2{f32(s.width) * 0.5, f32(s.height) * 0.5})
|
p := new(vec2.Vec2{f32(s.width) * 0.5, f32(s.height) * 0.5})
|
||||||
s.bin << p
|
s.bin << p
|
||||||
|
|
Loading…
Reference in New Issue