Refactor to use init and destructor to prevent leak.
Merge pull request #4 from gregwym/master

Refactor to use init and destructor to prevent leak.