static void analog_clock_destroy(Analog_Clock *analog_clock) { /* We are an animated object -- special case ! */ dynobj_list_remove_object(&analog_clock->element.object); element_destroy(&analog_clock->element); }
static void note_destroy(Note *note) { text_destroy(note->text); element_destroy(¬e->element); }
static void pgram_destroy(Pgram *pgram) { text_destroy(pgram->text); element_destroy(&pgram->element); }
static void state_destroy(State *state) { text_destroy(state->text); element_destroy(&state->element); }
static PyObject* element_destroy(ElementObject* self, PyObject* args) { int i; PyObject* res; if (!PyArg_NoArgs(args)) return NULL; /* break the backlink */ if (self->parent != Py_None) { Py_DECREF(self->parent); self->parent = Py_None; Py_INCREF(self->parent); } /* destroy element children */ if (self->children) { for (i = 0; i < self->child_count; i++) { res = element_destroy((ElementObject*) self->children[i], args); Py_DECREF(res); Py_DECREF(self->children[i]); } self->child_count = 0; } /* leave the rest to the garbage collector... */ Py_INCREF(Py_None); return Py_None; }
static void usecase_destroy(Usecase *usecase) { text_destroy(usecase->text); element_destroy(&usecase->element); }
static void step_destroy(Step *step) { dia_font_unref(step->font); g_free(step->id); element_destroy(&step->element); }
static void basestation_destroy(Basestation *basestation) { text_destroy(basestation->text); element_destroy(&basestation->element); }
static void box_destroy(Box *box) { text_destroy(box->text); element_destroy(&box->element); }
static void function_destroy(Function *pkg) { text_destroy(pkg->text); element_destroy(&pkg->element); }
static void req_destroy(Requirement *req) { text_destroy(req->text); element_destroy(&req->element); }
static void smallpackage_destroy(SmallPackage *pkg) { text_destroy(pkg->text); element_destroy(&pkg->element); }
static void actor_destroy(Actor *actor) { text_destroy(actor->text); element_destroy(&actor->element); }
static void ellipse_destroy(Ellipse *ellipse) { text_destroy(ellipse->text); element_destroy(&ellipse->element); }
static void ellipse_destroy(Ellipse *ellipse) { if (ellipse->pattern) g_object_unref (ellipse->pattern); element_destroy(&ellipse->element); }
static void diamond_destroy(Diamond *diamond) { text_destroy(diamond->text); element_destroy(&diamond->element); }
static void chronoref_destroy(Chronoref *chronoref) { dia_font_unref(chronoref->font); connpointline_destroy(chronoref->scale); element_destroy(&chronoref->element); }
static void transition_destroy(Transition *transition) { dia_font_unref(transition->rcep_font); boolequation_destroy(transition->receptivity); g_free(transition->rcep_value); element_destroy(&transition->element); }
static void rendobj_destroy(RenderObject *rend_obj) { element_destroy(&rend_obj->element); if (rend_obj->desc->use_text) text_destroy(rend_obj->text); g_free(rend_obj->connections); }
static void component_destroy(Component *cmp) { text_destroy(cmp->text); g_free(cmp->stereotype); g_free(cmp->st_stereotype); element_destroy(&cmp->element); }
static void image_destroy(Image *image) { if (image->file != NULL) g_free(image->file); if (image->image != NULL) dia_image_release(image->image); element_destroy(&image->element); }
static void largepackage_destroy(LargePackage *pkg) { dia_font_unref(pkg->font); g_free(pkg->stereotype); g_free(pkg->st_stereotype); g_free(pkg->name); element_destroy(&pkg->element); }
static void image_destroy(EImage *image) { if (image->file != NULL) { g_free(image->file); } if (image->image != NULL) { dia_image_unref(image->image); } element_destroy(&image->element); }
static void other_destroy(Other *other) { text_destroy(other->text); connpointline_destroy(other->east); connpointline_destroy(other->south); connpointline_destroy(other->west); connpointline_destroy(other->north); element_destroy(&other->element); }
void aadlbox_destroy(Aadlbox *aadlbox) { int i; text_destroy(aadlbox->name); /* object_unconnect needs valid handles (from ports) */ element_destroy(&aadlbox->element); for (i=0; i<aadlbox->num_ports; i++) free_port(aadlbox->ports[i]); }
static void _dae_destroy(DiagramAsElement *dae) { if (dae->data) g_object_unref(dae->data); g_free(dae->filename); if (dae->image) g_object_unref (dae->image); element_destroy(&dae->element); }
static void objet_destroy(Objet *ob) { text_destroy(ob->text); text_destroy(ob->attributes); g_free(ob->stereotype); g_free(ob->st_stereotype); g_free(ob->exstate); g_free(ob->attrib); element_destroy(&ob->element); }
static void box_destroy(Box *box) { element_destroy(&box->element); }
static void node_destroy(Node *node) { text_destroy(node->name); element_destroy(&node->element); }
static void attribute_destroy(Attribute *attribute) { element_destroy(&attribute->element); g_free(attribute->name); }