Re: [Vala] use weak and var together

2009-01-11 Thread Jürg Billeter
On Sat, 2009-01-10 at 23:48 +0100, Hans Vercammen wrote: Why do this manually? Don't you need to chain the dispose handlers throughout the hierarchy to make it usable somehow? As far as I understand the GObject dispose mechanism, it doesn't prevent the cyclic references from not being cleaned

Re: [Vala] use weak and var together

2009-01-10 Thread Jürg Billeter
On Sat, 2009-01-10 at 01:04 -0500, Yu Feng wrote: On Fri, 2008-12-12 at 08:08 +0100, Jürg Billeter wrote: On Thu, 2008-12-11 at 23:56 -0500, Yu Feng wrote: Talking about circular references, is it possible to have a circular ref breaker mechanism like the one in GTK for vala fundamental

Re: [Vala] use weak and var together

2009-01-10 Thread Yu Feng
On Sat, 2009-01-10 at 09:24 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 01:04 -0500, Yu Feng wrote: On Fri, 2008-12-12 at 08:08 +0100, Jürg Billeter wrote: On Thu, 2008-12-11 at 23:56 -0500, Yu Feng wrote: Talking about circular references, is it possible to have a circular ref

Re: [Vala] use weak and var together

2009-01-10 Thread Yu Feng
On Sat, 2009-01-10 at 19:36 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 13:07 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 18:35 +0100, Jürg Billeter wrote: Right, but I'm not sure that you need to change anything in the unref function to get dispose functionality working. Can you

Re: [Vala] use weak and var together

2009-01-10 Thread Noah Gibbs
Subject: Re: [Vala] use weak and var together To: Jürg Billeter j...@bitron.ch Cc: vala-list@gnome.org Date: Saturday, January 10, 2009, 12:45 PM On Sat, 2009-01-10 at 19:36 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 13:07 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 18:35 +0100, Jürg

Re: [Vala] use weak and var together

2009-01-10 Thread Hans Vercammen
On Sat, 2009-01-10 at 13:07 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 18:35 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 12:19 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 09:24 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 01:04 -0500, Yu Feng wrote: On Fri, 2008-12-12 at

Re: [Vala] use weak and var together

2009-01-10 Thread Hans Vercammen
On Sat, 2009-01-10 at 13:16 -0800, Noah Gibbs wrote: In addition to keeping a list of pointers to the object, you'll need to traverse them in some way to find cycles and free storage with cycles, but not pointed to by any non-cycles. That pass should not be done every time you break a pointer

Re: [Vala] use weak and var together

2009-01-10 Thread Hans Vercammen
On Sun, 2009-01-11 at 01:23 +0100, Thomas Chust wrote: Hans Vercammen wrote: On Sat, 2009-01-10 at 13:16 -0800, Noah Gibbs wrote: [...] Remember that an object can be part of more than one cycle, and you have to know how many of those refs are cyclic refs, and how many (if any) aren't

Re: [Vala] use weak and var together

2009-01-10 Thread Yu Feng
On Sat, 2009-01-10 at 23:48 +0100, Hans Vercammen wrote: On Sat, 2009-01-10 at 13:07 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 18:35 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 12:19 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 09:24 +0100, Jürg Billeter wrote: On Sat,

Re: [Vala] use weak and var together

2009-01-10 Thread Hans Vercammen
On Sat, 2009-01-10 at 21:12 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 23:48 +0100, Hans Vercammen wrote: On Sat, 2009-01-10 at 13:07 -0500, Yu Feng wrote: On Sat, 2009-01-10 at 18:35 +0100, Jürg Billeter wrote: On Sat, 2009-01-10 at 12:19 -0500, Yu Feng wrote: On Sat, 2009-01-10

Re: [Vala] use weak and var together

2009-01-09 Thread Yu Feng
Hi Jurg, Sorry for digging such an old post but I discovered something. See the end of the message. On Fri, 2008-12-12 at 08:08 +0100, Jürg Billeter wrote: On Thu, 2008-12-11 at 23:56 -0500, Yu Feng wrote: On Thu, 2008-12-11 at 22:11 +0100, Jürg Billeter wrote: On Wed, 2008-12-03 at 14:05

Re: [Vala] use weak and var together

2008-12-11 Thread Jürg Billeter
On Thu, 2008-12-11 at 23:56 -0500, Yu Feng wrote: On Thu, 2008-12-11 at 22:11 +0100, Jürg Billeter wrote: On Wed, 2008-12-03 at 14:05 +, Frédéric Gaudy wrote: I don't know if it' a bug or a feature. When I use weak and var keywords, I obtain a error: error: The type name `var'

[Vala] use weak and var together

2008-12-03 Thread Frédéric Gaudy
Hi, I don't know if it' a bug or a feature. When I use weak and var keywords, I obtain a error: error: The type name `var' could not be found Code : weak var thread = Thread.create( this.process_thread, true); If I define the type, no problem. weak Thread thread = Thread.create(