Fixed several memory leaks
Merge pull request #101 from bixuehujin/mem-leak-fix

Fixed several memory leaks