[Vala] reference management.



Hello.

How exactly does reference management (g_object_ref || g_object_unref)
works in Vala ? I know it will unref everything I don't explicitly
tell it to ignore when returning methods (By the way, how do I tell it
to ignore anything ? I couldn't figure out the syntax)

What I want to know is: I have a method which receives an object and
stores it in a member of the object of the said method. It will surely
want to g_object_ref() to make sure its reference will be valid as
long as it wants it to, and then unref it when no longer needed

How can I perform those ? I tried to find g_object_ref and
g_object_unref on the source tree but I found nothing that called
those (actually I found some stuff... but couldn't understand it)

Regards,
Alexandre Moreira.



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