I found an issue while trying to fix a leakage[0] of gstreamer-sharp. The problem is that Gst.Element and Gst.Pipeline (which is a child of Gst.Element) has Bus property. Then, the code generator adds new modifier for Gst.Pipeline so an application has a redundant instance which is never unreffed.
|
if (IsNew || (container_type.Parent != null && container_type.Parent.GetPropertyRecursively (Name) != null)) |
In the condition above, if a child class has the same property name with its parent, the code generator adds new modifier and it ignores new_flag attribute value even if it is set to false.
I think the generator should support virtual and override modifiers for parent and child respectively. Or, if there's nicer solution, please let me know.
[0] https://bugzilla.gnome.org/show_bug.cgi?id=793870
I found an issue while trying to fix a leakage[0] of gstreamer-sharp. The problem is that
Gst.ElementandGst.Pipeline(which is a child ofGst.Element) hasBusproperty. Then, the code generator addsnewmodifier forGst.Pipelineso an application has a redundant instance which is never unreffed.GtkSharp/Source/generator/Property.cs
Line 111 in e29851e
In the condition above, if a child class has the same property name with its parent, the code generator adds
newmodifier and it ignoresnew_flagattribute value even if it is set tofalse.I think the generator should support
virtualandoverridemodifiers for parent and child respectively. Or, if there's nicer solution, please let me know.[0] https://bugzilla.gnome.org/show_bug.cgi?id=793870