how to make object delete itself when hits well

I have this code in a bullet object so that it can detect when it hits a wall. Can someone tell me how to have the bullet destroy/delete itself when the collision happens:

function OnTriggerEnter (myTrigger : Collider) {

if(myTrigger.gameObject.name == “wall”)
Debug.Log(“bullet hit wall!”);

}

I tried the Destroy and the DestroyObject function but I couldn’t get it to work for the bullet to kill itself. Am I missing something? Thanks so much!!

Destroy (gameObject);

Destroy(this.gameObject);

or

Destroy(this.gameObject);

this is optional.
DanielQuick has a correct answer as well.

I put that code in and it doesn’t work. The debug log says “bullet hits wall”, as you see in my code. So I know and can see visually that the bullet does hit the wall. I put your code "Destroy (gameObject); " in the next line as you suggested, and still nothing happens. Here is the code where I show you how I added your command:
function OnTriggerEnter (myTrigger : Collider) {

if(myTrigger.gameObject.name == “wall”) {
Debug.Log(“bullet hit wall!”);
Destroy (gameObject); //YOUR SUGGESTED LINE OF CODE
}

Can you think of anything else I might be doing wrong??? Thanks!!
PS I also tried “Destroy (this.gameObject);” but that did not work either

function OnTriggerEnter (myTrigger : Collider) {

if(myTrigger.gameObject.name == “wall”)
Debug.Log(“bullet hit wall!”);
DestroyObject(this.gameObject);
}

if this does not work, then its because of something else.

I got it working. I had to change the function from “OnTriggerEnter” to “OnCollisionEnter”
Thanks guys.