Fix leaking json generator handle on shutdown
Merge pull request #22 from rampage644/memory

Fix leaking json generator handle on shutdown