Open sdroege opened 4 years ago
Should we separate GlibSharp, as I try to make in this project: https://github.com/glib-sharp? Should we have a roadmap?
Sorry for the fork, but I'm using Cake as the building tool, who is much more easy to .NET developers like me.
Should we separate GlibSharp, as I try to make in this project: https://github.com/glib-sharp? Should we have a roadmap?
You didn't preserve any of the history, which makes it rather useless.
Also there is already yet another fork here: https://github.com/GtkSharp/GtkSharp (which diverged quite a bit from this one and has even worse memory management bugs because of that)
Currently
GLib.Value
is a value type (aka struct). This means that it can't have a finalizer and also that it can be simply copied around without any additional operations happening.All that is fine if the value contains integers or similar things but falls apart if it contains pointers to something else (strings, objects, boxed types, ...). Then it will
Dispose()
call will fix that but the GC would never do that automatically)GLib.Value
s with the same pointer...)Value types should never be used for anything that handles native resources for the above reasons.
Unfortunately changing it to a reference type (aka class) is not so easy due to how it is used everywhere right now.