Its ok in islam only upto a certain time, after that it would be considered killing a life.