Skip to content

Commit

Permalink
I forgor to Dispose() the manager 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
Speykious committed Dec 15, 2021
1 parent b724f66 commit e900cc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion SeeShark.Example.Ascii/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace SeeShark.Example.Ascii
class Program
{
static Camera? karen;
static CameraManager? manager;
static FrameConverter? converter;

static void Main(string[] args)
Expand All @@ -37,7 +38,7 @@ static void Main(string[] args)
Console.WriteLine("Running in {0}-bit mode.", Environment.Is64BitProcess ? "64" : "32");
Console.WriteLine($"FFmpeg version info: {FFmpegVersion}");

var manager = new CameraManager();
manager = new CameraManager();

string devicePath;
if (args.Length < 1)
Expand Down Expand Up @@ -150,6 +151,7 @@ public static void Dispose()
{
karen?.StopCapture();
karen?.Dispose();
manager?.Dispose();
converter?.Dispose();
}

Expand Down
4 changes: 3 additions & 1 deletion SeeShark.Example.Stats/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace SeeShark.Example.Stats
class Program
{
static Camera? karen;
static CameraManager? manager;

static void Main(string[] args)
{
Expand All @@ -31,7 +32,7 @@ static void Main(string[] args)
"/usr/lib64"
);

var manager = new CameraManager();
manager = new CameraManager();

string devicePath;
if (args.Length < 1)
Expand Down Expand Up @@ -153,6 +154,7 @@ public static void Dispose()
{
karen?.StopCapture();
karen?.Dispose();
manager?.Dispose();
}
}
}

0 comments on commit e900cc4

Please sign in to comment.