to decide to stop trying to help sb or to do sth because there is no hope of success
give sb / sth up as a bad job
to decide to stop trying to help sb or to do sth because there is no hope of success
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition