C#: Properly dispose diagnostic writer objects

This commit is contained in:
Tamas Vajk
2024-03-25 13:49:46 +01:00
parent d7e514913f
commit 0f980e2b97
3 changed files with 17 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ namespace Semmle.Autobuild.Cpp
try
{
Console.WriteLine("CodeQL C++ autobuilder");
var builder = new CppAutobuilder(actions, options);
using var builder = new CppAutobuilder(actions, options);
return builder.AttemptBuild();
}
catch (InvalidEnvironmentException ex)