Say someone adopts an a pet dog from the dog pound. He gives the dog great attention and treats the dog very well and the dog grows healthily and goes on to win all sorts of dog contests. Time goes and this person is not able to take care of the dog anymore. If he keeps the dog and lets the dog slowly and excruciatingly die, it's not morally right. The morally right decision is to put that dog back up for adoption so it can enter another great home with an owner who can afford both the facilities and time to take care of it.
In this analogy, it would only be morally right to give up the dog to someone else who can give it the care. But of course the dog will forever be grateful to the owner for its time there and also grateful for putting the dog's needs before his own needs.

