GNOME Bugzilla – Bug 533484
Support owned delegates with GDestroyNotify
Last modified: 2008-06-02 19:47:46 UTC
Owned delegates should have an additional GDestroyNotify field/parameter for freeing the memory of the target object / user_data. This makes it possible to support libraries with methods that accept a GDestroyNotify parameter in addition to the user_data for callbacks. Support for owned delegates will also be necessary when we want to add full closure support to Vala, i.e. allow lambda methods access to local variables by extending the life time of local variables to the life time of the delegate.
2008-06-02 Jürg Billeter <j@bitron.ch> * gobject/valaccodegenerator.vala: * gobject/valaccodeinvocationexpressionbinding.vala: * gobject/valaccodemethodbinding.vala: Add basic support for owned delegates, fixes bug 533484 Fixed in r1544.
When you have time, can you add some stuff on the wiki how owned delegates work? Thanks Jaap