/* GCNEW_UNCOLLECTABLE clears the allocated memory */
+#if defined(ENABLE_GC_CACAO)
+ c = (classinfo *) heap_alloc_uncollectable(sizeof(classinfo));
+#else
c = GCNEW_UNCOLLECTABLE(classinfo, 1);
/*c=NEW(classinfo);*/
+#endif
c->name = classname;
/* Set the header.vftbl of all loaded classes to the one of
mem_free(c->header.vftbl, sizeof(vftbl) + sizeof(methodptr)*(c->vftbl->vftbllength-1)); */
/* GCFREE(c); */
+
+#if defined(ENABLE_ANNOTATIONS)
+ annotation_bytearray_free(c->annotations);
+
+ annotation_bytearrays_free(c->method_annotations);
+ annotation_bytearrays_free(c->method_parameterannotations);
+ annotation_bytearrays_free(c->method_annotationdefaults);
+
+ annotation_bytearrays_free(c->field_annotations);
+#endif
}