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.deathZones = null;
this.bounds = null; this.bounds = null;
this.follow = null; this.follow = null;
this.ops = null;
this.counters = null; this.counters = null;
var i; 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++) for (i = 0; i < this.particles.length; i++)
{ {
this.particles[i].destroy(); this.particles[i].destroy();
@ -3413,6 +3421,7 @@ var ParticleEmitter = new Class({
this.dead[i].destroy(); this.dead[i].destroy();
} }
this.ops = null;
this.particles = []; this.particles = [];
this.dead = []; this.dead = [];
} }