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

...sting.