Fix sundries memory leaks
Merge pull request #10 from OpenGeoscience/john/object-lifecycle-fixes

John/object lifecycle fixes