Memory leak when creating or disposing Pipeline
This code seems to leak approx 115 bytes per itteration. Garbage collection has been forced but that does not help. Code has been running for several days. Could it be related to https://github.com/GLibSharp/GtkSharp/pull/41? I thought that was fixed...
Running 1.18.1 and gstreamer-sharp 1.17.0.1 (as 1.18 does not work properly in some aspects)
private void Startup()
{
GLib.MainLoop _mainLoop = null; ;
System.Threading.Thread _mainGlibThread;
Gst.Application.Init();
GtkSharp.GstreamerSharp.ObjectManager.Initialize();
_mainLoop = new GLib.MainLoop();
_mainGlibThread = new System.Threading.Thread(_mainLoop.Run);
_mainGlibThread.Start();
timer.Interval = 2000;
timer.Start();
}
private void timer_Tick()
{
if (_pipeline != null)
{
StateChangeReturn ret = _pipeline.SetState(State.Null);
if (ret != StateChangeReturn.Success)
{
// Seems to never happen, but is there as a check.
MessageBox.Show("State did not change to null");
}
_pipeline.Dispose();
_pipeline = null;
}
else
{
_pipeline = (Pipeline)Parse.Launch(“videotestsrc ! d3d11videosink”);
_pipeline.SetState(State.Playing);
}
}