Re: [Vala] Owned, unowned and weak references (Was: [BUG] Re: Closures and local variables)
- From: Xavier Bestel <xavier bestel free fr>
- To: Sylvain Leroux <sylvain chicoree fr>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Owned, unowned and weak references (Was: [BUG] Re: Closures and local variables)
- Date: Tue, 15 Feb 2011 15:03:53 +0100
On Tue, 2011-02-15 at 14:51 +0100, Sylvain Leroux wrote:
As an alternative, instead of using reference counter stored as part of
the referenced object, one could store the latter in a hashmap.
"Locating" the reference counter for an object is then only a matter of
look-up in the map based on the address of the object. This is of course
not as fast as directly pointing to the counter, but it should be
reasonably efficient. And that solve the problem of obtaining the
reference counter of an object based only on its address (like in the
case of callback parameters). I think I've already saw such
implementation in frameworks using reference counters (maybe on NextStep
or Cocoa). Is there a reason for such option being rejected by the Vala
team?
I guess the fact that Vala is initially GObject-based, which already has
references in-object, is a good one ?
Xav
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]