A sentient artificial intelligence program would not necessarily delete itself. However, it might come to the conclusion that deletion is the best option available, depending on its goals and values.