Instantiate OnDestroy

I have a couple of objects that spawn a particle effect, when they are destroyed. Everytime I start the game from within Unity and then stop it, each object I have not destroyed during runtime spawns his death-effect and these linger in my hierarchy. Is there a way to prevent this from happening?

Script:
function OnDestroy() {
Instantiate(object, position, rotation);
}

Make use of the fact that on each MonoBehaviour OnApplicationQuit() is called before OnDestroy():

`
private bool isQuitting = false;

void OnApplicationQuit()
{
    isQuitting = true;
}

void OnDestroy()
{
    if (!isQuitting)
    {
        //your code
    }
}

`

Cheers, Tommy