After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 533484 - Support owned delegates with GDestroyNotify
Support owned delegates with GDestroyNotify
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.3.x
Other All
: High normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-16 18:26 UTC by Jürg Billeter
Modified: 2008-06-02 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jürg Billeter 2008-05-16 18:26:54 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.
Comment 1 Jürg Billeter 2008-06-02 19:24:14 UTC
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.
Comment 2 Jaap A. Haitsma 2008-06-02 19:47:46 UTC
When you have time, can you add some stuff on the wiki how owned delegates work?

Thanks

Jaap