id_set_data_full


Description:

public void id_set_data_full (Quark key_id, owned G data, DestroyNotify? destroy_func)

Sets the data corresponding to the given Quark id, and the function to be called when the element is removed from the datalist.

Any previous data with the same key is removed, and its destroy function is called.

Parameters:

key_id

the Quark to identify the data element.

data

the data element or null to remove any previous element corresponding to key_id.

destroy_func

the function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it. If data is null, then destroy_func must also be null.

datalist

a datalist.