void objc_free_all_classes(void) { uint32_t i; if (classes == NULL) return; for (i = 0; i <= classes->last_idx; i++) { if (classes->data[i] != NULL) { free_class((Class)classes->data[i]->obj); free_class(object_getClass((id)classes->data[i]->obj)); } } objc_hashtable_free(classes); classes = NULL; }
void c_member(int idx) { array_t *arr; if (sp->type != T_CLASS) error("Tried to take a member of something that isn't a class.\n"); arr = sp->u.arr; if (idx >= arr->size) error("Class has no corresponding member.\n"); assign_svalue_no_free(sp, &arr->item[idx]); free_class(arr); }
void c_member_lvalue(int idx) { array_t *arr; if (sp->type != T_CLASS) error("Tried to take a member of something that isn't a class.\n"); arr = sp->u.arr; if (idx >= arr->size) error("Class has no corresponding member.\n"); sp->type = T_LVALUE; sp->u.lvalue = arr->item + idx; free_class(arr); }
/** Unlink (and dereference) invalid connection classes. * This is used in combination with class_mark_delete() during rehash * to get rid of connection classes that are no longer in the * configuration. */ void class_delete_marked(void) { struct ConnectionClass* cl; struct ConnectionClass* prev; Debug((DEBUG_DEBUG, "Class check:")); for (prev = cl = connClassList; cl; cl = prev->next) { Debug((DEBUG_DEBUG, "Class %s : CF: %d PF: %d ML: %d LI: %d SQ: %d", ConClass(cl), ConFreq(cl), PingFreq(cl), MaxLinks(cl), Links(cl), MaxSendq(cl))); /* * unlink marked classes, delete unreferenced ones */ if (cl->valid || Links(cl) > 1) prev = cl; else { prev->next = cl->next; free_class(cl); } } }
void clear() { kof.new_plus(""); roz.free_class(); baza.free_class(); }