Re: [Vala] Thread unsafe GObject?

On Mo, 2011-01-17 at 08:18 -0600, Sandino Flores Moreno wrote:
It's both an error from you and valac.

List<...> values = hash.get_values();
That should be unowned, because the documentation clearly stated that
it is owned by the hash table.
"a GList containing all the values inside the hash table. The content
of the list is owned by the hash table and should not be modified or
freed. Use g_list_free() when done using the list."

The list should be owned, the values in it are unowned; that is for a
hash table storing values of type T, the list returned by get_values()

        List<unowned T>

Julian Andres Klode  - Debian Developer, Ubuntu Member

See and

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