Meaning of dog-in-the-manger attitude?

A dog-in-the-manger attitude is a person who selfishly keeps something not needed or wanted so that others may not enjoy it.