Fix for compound type memory leak
Merge pull request #387 from andrewcollette/issue_385

Fix for compound type memory leak