Re: [Vala] reference management.



On Die, 2007-03-20 at 19:15 -0300, Alexandre Moreira wrote:
On 3/20/07, Jürg Billeter <j bitron ch> wrote:
On Die, 2007-03-20 at 10:17 -0300, Alexandre Moreira wrote:
I think it would be just great to allow the user to specify an "expert
mode" and allow him to do the ref unref by himself (just like GObject
does, giving G.Object a method to do each action) and, at most, having
the auto-unref-local-variables-unless-specified-otherwise.

Basically it would mean the addition of the ref/unref methods and an
option to set all references to weak.

You can disable automatic memory management in vala by using the
--disable-memory-management command-line option. I've also added ref and
unref methods to GLib.Object, so you can leak as much memory as you want
now ;)

Just to be sure, these (methods ref and unref) aren't available in the
current svn 249, are they ? if they are, I can't find a way to use
them in anyway...

They should be available since r247 but unfortunately you have to use
foo  ref () instead of foo.ref () as ref is a keyword.

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]