Re: [Vala] Singleton and reference count



Hello,

On Wed, April 28, 2010 13:46, Jan Niklas Hasse wrote:
On Wed, Apr 28, 2010 at 11:31 AM, pancake <pancake youterm com> wrote:
On Apr 28, 2010, at 10:24 AM, Jan Niklas Hasse <jhasse gmail com> wrote:

2010/4/28 Sam Wilson <tecywiz121 hotmail com>:

The only questionable part is that vala doesn't unref namespace scoped
variables when the program terminates, so you have to do that
manually.

Is Vala using Garbage Collection?

Nope

So shouldn't Vala unref namespace scoped variables when leaving their
scope?

IMHO there is no reason to do it. The compiler could do it (using the
atexit mechanism) but than there are many ways the process can terminate
without calling them anyway (calling _exit, receiving fatal signal, the power
going out etc.). Therefore the program shouldn't rely on them for anything
important anyway and since system will clean up resources anyway, they are
not needed for that either. So IMHO supporting them would just promote
unreliable code and is thus not worth doing.

-- 
                                        - Jan Hudec <bulb ucw cz>




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