Regarding copying delegates, it is intentional. The Vala Journal has a nice write-up about ways to work around the problem:
http://valajournal.blogspot.com/2011/06/vala-0130-released.html -- Jim On Sun, Jun 19, 2011 at 9:20 PM, Nor Jaidi Tuah <[email protected]>wrote: > valac version: 0.13.0 > > When an async method accepts a delegate as its > argument, I get the warning "copying delegates is discouraged". > Is this intended? > > I also get segmentation fault trying to pass > a closure accessing local variables. The closure > works if it doesn't access local vars. > > e.g., > var f = etc; > async_func ( () => { fn (f);} ); > > will crash trying to access f. Apparently > the closure isn't properly constructed. > > Is this a known bug? Any simple workaround? > > hand > Nor Jaidi Tuah > > > _______________________________________________ > vala-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/vala-list >
_______________________________________________ vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
