Destroy the EmitterOps

This commit is contained in:
Richard Davey 2023-01-03 12:32:15 +00:00
parent 9ce33a2fd5
commit bc1bc3baba

View file

@ -3398,11 +3398,19 @@ var ParticleEmitter = new Class({
this.deathZones = null;
this.bounds = null;
this.follow = null;
this.ops = null;
this.counters = null;
var i;
var ops = this.ops;
for (i = 0; i < configOpMap.length; i++)
{
var key = configOpMap[i];
ops[key].destroy();
}
for (i = 0; i < this.particles.length; i++)
{
this.particles[i].destroy();
@ -3413,6 +3421,7 @@ var ParticleEmitter = new Class({
this.dead[i].destroy();
}
this.ops = null;
this.particles = [];
this.dead = [];
}