Disposable objects must be disposed, prevent output window splashing.

This properly handles disposable objects and also prevent the cppcheck.exe output window from splashing briefly.