fix the memory leak problem mentioned in #26
Merge pull request #38 from monnand/memleak

fix the memory leak problem mentioned in #26