Esempio n. 1
0
/**
 * Free keys and values from the aging table.
 */
static void
aging_free(void *value, void *data)
{
	struct aging_value *aval = value;
	aging_table_t *ag = data;

	aging_check(ag);
	assert_aging_locked(ag);

	if (ag->kvfree != NULL)
		(*ag->kvfree)(aval->key, aval->value);

	elist_remove(&ag->list, aval);
	WFREE(aval);
}
Esempio n. 2
0
File: duck.c Progetto: harnold/ducks
void destroy_duck(struct duck *duck)
{
    elist_remove(&duck->link);
    delete_sprite(duck->sprite);
}