title: DestroyImmediate() Not working
body: <p>making a small game for my own enjoyment, and have a button which i want to use to cancel the audio being played.</p>
  
  <p>The audio is created in this method:</p>
  
  <pre><code>public void PlaySound(AudioClip[] audioClip )
  {
      int random = Random.Range(0, audioClip.Length);
      Ed = (AudioSource)gameObject.AddComponent&lt;AudioSource&gt;();
      AudioClip myNew;
      myNew = audioClip[random];
      Ed.clip = myNew;
      Ed.Play();
  }
  </code></pre>
  
  <p>And i'm trying to destroy in this one:</p>
  
  <pre><code>public void StopPlayBack()
  {
      AudioSource myAudio;
  
      myAudio = GetComponent&lt;AudioSource&gt;();
      Debug.Log("My Audio is 1 :" + myAudio);
      if (myAudio != null)
      {
          DestroyImmediate(myAudio);
          Debug.Log("My Audio is NOT null");
          Debug.Log("My Audio is 2 :" + myAudio);
      }
      else if ( myAudio == null)
      {
          Debug.Log("My Audio is null");
      }
      Debug.Log("My Audio is 3 :" + myAudio);
  
  }
  }
  </code></pre>
  
  <p>Sometime the audio will be destroyed, and sometime I have to click the button twice. The Debug logs will always show the same result however, whether it is destroyed or not. ( ie After the destroy method, the audioSource is null) Not sure why it sometimes works and sometimes does not?</p>