Hello,

On Thursday, 11 April, 2013 03:51 PM, Donn wrote:
https://developer.gnome.org/clutter/stable/ClutterCanvas.html
Scroll down to 'Description' - there's sample code.

1. In the int main, at: canvas = clutter_canvas_new();
2. They do: clutter_actor_set_content( actor, canvas );
3. A few lines down they do:
/* the actor now owns the canvas */
g_object_unref(canvas);

In my vala class, I did:
this.set_content(canvas);

Should I be worrying about canvas? (Declare it weak, maybe?)
Or, is it okay since it's defined and used within the class?

Vala will automatically add code to decrease its references by one (unref) once the block where it belongs ends (in this case, the class constructor).


Regards,

Arnel A. Borja
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to