Fixes leak detected for static memory used and not freed via DebugMem testing.
Merge pull request #747 from seanpaultaylor/next

Fixes leak detected for static memory used and not freed via DebugMem te...