Re: [Vala] Question regarding passing a strings as arguments to a method
- From: Serge Hulne <serge hulne gmail com>
- To: Abderrahim Kitouni <a kitouni gmail com>, vala-list <vala-list gnome org>
- Subject: Re: [Vala] Question regarding passing a strings as arguments to a method
- Date: Mon, 11 Jul 2011 14:03:12 +0200
A string in Vala is a *reference* type [1] and therefore passed by
Not according to the documentation:
Cf Vala tutorial:
"Reference Types
The reference types are all types declared as a class, regardless of
whether they are descended from GLib's Object or not. Vala will ensure
that when you pass an object by reference the system will keep track
of the number of references currently alive in order to manage the
memory for you. The value of a reference that does not point anywhere
is null. More on classes and their features in the section about
object oriented programming."
That is why I sought to clarify this point
Serge.
reference. The documentation is correct here, it may just need to
point out clearly that fact.
HTH,
Abderrahim
[1] it is a bit special because it is immutable, and thus copied
whenever there is a new strong reference to it
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]