fix memory leak
Merge pull request #392 from tetsurom/ClassFix

fix memory leak