shuriken auto destruct script doesn't ALWAYS work?

Hi, after looking around on the net i found this code :

function LateUpdate () {
if (!particleSystem.IsAlive()){
Destroy (this.gameObject);
}
}

to destroy particle systems instantiated ingame, the majority of the time the code does as it should, but every odd runtime, (even if i haven’t changed the scene in any way), it will still show the 6 white circles when the particle system ends, is there a more solid code?

Really silly - crossing over assets from a PC to a mac, and the Unity Explosion Framework doesn’t support IOS, lesson - always read the small print.

Consider moving LateUpdate check to external controller. You might gain a little performance. I wrote full explanation in article: Auto destroying particle system in unity3d