[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Vala] Closures in vala
- From: Jürg Billeter <j bitron ch>
- To: Denis Cheremisov <denis-cheremisov yandex ru>
- Cc: vala <vala-list gnome org>
- Subject: Re: [Vala] Closures in vala
- Date: Mon, 21 Jan 2008 14:53:15 +0100
On Sat, 2008-01-19 at 20:17 +0300, Denis Cheremisov wrote:
> Of course, it is because of loop reference, while now vala's memory
> management is using reference counting.
No, it has nothing to do with reference cycles. The issue is that most C
functions accepting callbacks with a user_data pointer don't accept an
additional pointer to a free function for the user_data pointer. This
would be necessary to support closures with allocated user_data, though.
> I suppose it's an inconvenience, to keep in mind, to create "weak"
> object instead of normal. Why don't you use libgc?
While it's theoretically possible, it'd probably have more disadvantages
than advantages for Vala, especially for Vala libraries.
Jürg
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]