static void destructor(void* v) { Item* q; List* sl = (List*)v; ITERATE(q, sl) { section_unref(q->element.sec); }
free_syn() { int i; if (maxstim) { for (i=0; i < maxstim; ++i) { if (pstim[i].sec) { section_unref(pstim[i].sec); } } free((char *)pstim); maxstim = 0; } }
static void NPySecObj_dealloc(NPySecObj* self) { //printf("NPySecObj_dealloc %lx %s\n", (long)self, secname(self->sec_)); if (self->sec_) { if (self->sec_->prop) { self->sec_->prop->dparam[PROP_PY_INDEX]._pvoid = 0; } if (self->name_) { delete [] self->name_; } if (self->sec_->prop && !self->sec_->prop->dparam[0].sym) { sec_free(self->sec_->prop->dparam[8].itm); }else{ section_unref(self->sec_); } } ((PyObject*)self)->ob_type->tp_free((PyObject*)self); }
NrnSectionImpl::~NrnSectionImpl() { section_unref(sec_); }
void NrnSection::section(Section* sec) { section_ref(sec); section_unref(npi_->sec_); npi_->sec_ = sec; }