mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
429 stars 140 forks source link

[Atk] Fix Atk.Object leaks. #192

Closed Therzok closed 7 years ago

alanmcgovern commented 7 years ago

Just copying this comment from the old PR: I'm a little worried by the Atk change because there's a method called ref_child and it no longer refs the child. We've definitely broken the semantics behind this method. It looks like native code is expecting a native ref to be added, but with this change we are not doing that. This method is now a no-op for the case where the managed wrapper already exists, and for the case where the managed wrapper does not exist we add a ref, but it's a ref owned by managed, not by native.

alanmcgovern commented 7 years ago

The changes seem reasonable to me but i haven't tested em. I'll leave it to Iain's best judgement ;)

Therzok commented 7 years ago

Re-review please, I added more things onto it that should fix bindings for Atk#

iainx commented 7 years ago

Will the objectfactory changes mean that native code can create AtkObjects that are created in managed code?

Therzok commented 7 years ago

Yes

iainx commented 7 years ago

yet :) that will make the custom accessibility stuff much easier

Therzok commented 7 years ago

At least, I think that's how it's going to work, the binding is now fully implemented - with override and base calls, so it should work just fine.

alanmcgovern commented 7 years ago

Should we merge this if everyone is happy?

Therzok commented 7 years ago

Yup, let's go ahead