Fixed issue #39 - Corrected destructor definitions; fixed memory leaks.
Merge branch 'issue-39' into develop