Thanks for the replies, I just have one little question.

MrDeath said if you delete an object which is on stack and it has children on stack then the program will crash. So the only objects that should be on stack are those that don't have any children?

Thanks!