If the Owned property of a Gst.MiniObject (base class Opaque) is set
from true to false during its lifetime, its reference count is not
decremented.
For example when Gst.Event (derived from Gst.MiniObject) is created
using Gst.Event.NewEos(), Gst.MiniObject.Ref() increments its ref count
and sets Owned = true. Then, passing the event to Gst.Pad.PushEvent(),
sets Owned = false, but this change won't remove the extra reference
that MiniObject.Ref() added earlier and it won't get cleared even when
Unref() gets eventualy called from Dispose(), because
Gst.MiniObject.Unref() only decrements ref count of objects that are
Owned.
This change Unref()s the object when Owned property gets set to false.
If the Owned property of a Gst.MiniObject (base class Opaque) is set from true to false during its lifetime, its reference count is not decremented.
For example when Gst.Event (derived from Gst.MiniObject) is created using Gst.Event.NewEos(), Gst.MiniObject.Ref() increments its ref count and sets Owned = true. Then, passing the event to Gst.Pad.PushEvent(), sets Owned = false, but this change won't remove the extra reference that MiniObject.Ref() added earlier and it won't get cleared even when Unref() gets eventualy called from Dispose(), because Gst.MiniObject.Unref() only decrements ref count of objects that are Owned.
This change Unref()s the object when Owned property gets set to false.