Fixed global memory leaks for a few tests.
Merge pull request #7 from bdickason/global-leaks

Fixed global memory leaks for a few tests.