Re: [Vala] What is the right syntax for defining pointers or references or "aliases" in Vala ?



On Mon, 2011-06-20 at 21:39 +0200, Serge Hulne wrote: 
What is the Vala syntax to express that :

b is a alias of a (or b points to the same address that a or b is a
reference to a).

Is there a way to express this in vala or does *assignment always mean
memory allocation* in Vala.

I'm not an expert, but I'm pretty sure that with classes, assignment
means setting the variable to point to the object, and increasing the
object's reference count.

I'm not entirely sure what happens with structures though.

In other terms : How do you store references to variables (or pointers
to variables) in, say, a container (a libgee data structure) while
avoiding duplication of said data.

Use the variables directly.

In C or C++ this would be done with pointers (or references).

Most variables in vala are pointers to objects.


Sam

Attachment: smime.p7s
Description: S/MIME cryptographic signature



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