Yes, giving to charity is a good antidote to stinginess and it's highly encouraged in Islam.