ObjectWrap.setData
void setData(string key, void * data = null)Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key is converted to a #GQuark using [glib.global.quarkFromString]. This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.
Parameters
key | name of the key |
data | data to associate with that key |