diff options
author | Stephan Sundermann <ssundermann@gnome.org> | 2014-08-01 17:01:17 +0200 |
---|---|---|
committer | Stephan Sundermann <ssundermann@gnome.org> | 2014-08-01 17:01:17 +0200 |
commit | c5216c0bc317b195f4fa5a303ad44e6eb8edaaf5 (patch) | |
tree | abb62c75dbb4ff150cc6e1ad7c6194bc5aa924a2 /samples | |
parent | 27d42dfd3fe0ec459890fb7ad70fde4439fb5004 (diff) |
samples: Leave memory management up to the GC
Diffstat (limited to 'samples')
-rw-r--r-- | samples/BasicTutorial1.cs | 5 | ||||
-rw-r--r-- | samples/BasicTutorial2.cs | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/samples/BasicTutorial1.cs b/samples/BasicTutorial1.cs index 4b2035d..f7b8c00 100644 --- a/samples/BasicTutorial1.cs +++ b/samples/BasicTutorial1.cs @@ -24,12 +24,7 @@ namespace GstreamerSharp var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error); // Free resources - if (msg != null) - msg.Dispose (); - - bus.Dispose (); pipeline.SetState (State.Null); - pipeline.Dispose (); } } }
\ No newline at end of file diff --git a/samples/BasicTutorial2.cs b/samples/BasicTutorial2.cs index 4f68182..b6b29c3 100644 --- a/samples/BasicTutorial2.cs +++ b/samples/BasicTutorial2.cs @@ -28,7 +28,6 @@ namespace GstreamerSharp // Build the pipeline pipeline.Add (source, sink); if (!source.Link (sink)) { - pipeline.Dispose (); Console.WriteLine ("Elements could not be linked"); return; } @@ -40,7 +39,6 @@ namespace GstreamerSharp var ret = pipeline.SetState(State.Playing); if (ret == StateChangeReturn.Failure) { Console.WriteLine ("Unable to set the pipeline to the playing state"); - pipeline.Dispose (); return; } @@ -66,12 +64,9 @@ namespace GstreamerSharp Console.WriteLine ("Unexpected messag received"); break; } - msg.Dispose (); } - bus.Dispose (); pipeline.SetState (State.Null); - pipeline.Dispose (); } } }
\ No newline at end of file |