static void _wi_dictionary_dealloc(wi_runtime_instance_t *instance) { wi_dictionary_t *dictionary = instance; wi_uinteger_t i; _wi_dictionary_remove_all_data(dictionary); if(dictionary->bucket_chunks) { for(i = 0; i < dictionary->bucket_chunks_count; i++) wi_free(dictionary->bucket_chunks[i]); wi_free(dictionary->bucket_chunks); } wi_free(dictionary->buckets); wi_release(dictionary->lock); }
void wi_mutable_dictionary_remove_all_data(wi_mutable_dictionary_t *dictionary) { WI_RUNTIME_ASSERT_MUTABLE(dictionary); _wi_dictionary_remove_all_data(dictionary); }
void wi_mutable_dictionary_set_dictionary(wi_mutable_dictionary_t *dictionary, wi_dictionary_t *otherdictionary) { WI_RUNTIME_ASSERT_MUTABLE(dictionary); _wi_dictionary_remove_all_data(dictionary); wi_mutable_dictionary_add_entries_from_dictionary(dictionary, otherdictionary); }