For memory leaks check the FAQ. I have included a link.
As for bounty, bounty is a good thing. Bounty means that if an unit is killed, it should correctly give experience to heroes around the unit killed, if they belong to the same owner the killer also belongs. Moreover, bounty also gives gold to the player whose unit kills a creep.
Bounty problems come when, while triggering a spell, instead of correctly damaging the target, you just decrease its life. If an unit dies by the simple decreasal of the life, no player gets bounty.
~Daelin