void DString_DeleteData( DString *self ) { int *data = (int*)self->chars - self->sharing; if( self->aux ){ DStringAux_Delete( self->aux ); self->aux = NULL; } if( data == NULL || data == dao_string ) return; if( self->sharing ){ #ifdef DAO_WITH_THREAD DMutex_Lock( & mutex_string_sharing ); #endif if( self->sharing ){ data[0] -= 1; if( data[0] ==0 ) dao_free( data ); } #ifdef DAO_WITH_THREAD DMutex_Unlock( & mutex_string_sharing ); #endif }else{ dao_free( data ); } self->sharing = 0; self->chars = NULL; }
void DaoObject_Delete( DaoObject *self ) { int i; #ifdef DAO_USE_GC_LOGGER DaoObjectLogger_LogDelete( (DaoValue*) self ); #endif GC_DecRC( self->defClass ); GC_DecRC( self->parent ); if( self->isRoot ){ for(i=0; i<self->valueCount; i++) GC_DecRC( self->objValues[i] ); if( self->objValues != (DaoValue**) (self + 1) ) dao_free( self->objValues ); } dao_free( self ); }
void DaoQueue_Delete( DaoQueue *self ) { QueueItem *item; while( self->tail != NULL ){ item = self->tail; self->tail = item->previous; DaoGC_DecRC( item->value ); dao_free( item ); } DaoGC_DecRC( (DaoValue*)self->mtx ); DaoGC_DecRC( (DaoValue*)self->pushvar ); DaoGC_DecRC( (DaoValue*)self->popvar ); DaoCstruct_Free( (DaoCstruct*)self ); dao_free( self ); }
void DaoClass_Delete( DaoClass *self ) { GC_DecRC( self->clsType ); DMap_Delete( self->abstypes ); DMap_Delete( self->lookupTable ); DMap_Delete( self->ovldRoutMap ); DArray_Delete( self->constants ); DArray_Delete( self->variables ); DArray_Delete( self->instvars ); DArray_Delete( self->objDataName ); DArray_Delete( self->cstDataName ); DArray_Delete( self->glbDataName ); DArray_Delete( self->superClass ); DArray_Delete( self->references ); if( self->vtable ) DMap_Delete( self->vtable ); if( self->protoValues ) DMap_Delete( self->protoValues ); #ifdef DAO_WITH_DYNCLASS if( self->typeHolders ){ DArray_Delete( self->typeHolders ); DArray_Delete( self->typeDefaults ); DMap_Delete( self->instanceClasses ); } #endif DString_Delete( self->className ); dao_free( self ); }
void DaoxNode_Delete( DaoxNode *self ) { DaoCstruct_Free( (DaoCstruct*) self ); if( self->ins ) DList_Delete( self->ins ); DList_Delete( self->outs ); dao_free( self ); }
void DaoxFont_Delete( DaoxFont *self ) { DMap_Delete( self->glyphs ); DString_Delete( self->buffer ); DaoCstruct_Free( (DaoCstruct*) self ); dao_free( self ); }
void DaoxDataColumn_Delete( DaoxDataColumn *self ) { DaoxDataColumn_Reset( self, 0 ); DVector_Delete( self->cells ); GC_DecRC( self->type ); dao_free( self ); }
static void DaoCallServer_Delete( DaoCallServer *self ) { daoint i; for(i=0; i<self->threads->size; i++){ DaoCallThread_Delete( (DaoCallThread*)self->threads->items.pVoid[i] ); } for(i=0; i<self->caches->size; ++i){ DaoTaskEvent_Delete( (DaoTaskEvent*) self->caches->items.pVoid[i] ); } DList_Delete( self->threads ); DList_Delete( self->functions ); DList_Delete( self->parameters ); DList_Delete( self->owners ); DList_Delete( self->events ); DList_Delete( self->events2 ); DList_Delete( self->caches ); DMap_Delete( self->waitings ); DMap_Delete( self->pending ); DMap_Delete( self->active ); DMutex_Destroy( & self->mutex ); DCondVar_Destroy( & self->condv ); DCondVar_Destroy( & self->condv2 ); DThread_Destroy( & self->timer ); dao_free( self ); }
void DaoxProfiler_Delete( DaoxProfiler *self ) { DMutex_Destroy( & self->mutex ); DMap_Delete( self->profile ); DMap_Delete( self->one ); dao_free( self ); }
static void DaoMethodFields_Delete( DaoMethodFields *self ) { DArray_Delete( self->names ); DArray_Delete( self->perms ); DArray_Delete( self->routines ); dao_free( self ); }
void DaoLexer_Delete( DaoLexer *self ) { daoint i; for(i=0; i<self->tokbuf->size; ++i) DaoToken_Delete( self->tokbuf->items.pToken[i] ); DArray_Delete( self->tokens ); DArray_Delete( self->tokbuf ); dao_free( self ); }
void DArray_Delete( DArray *self ) { #ifdef DAO_GC_PROF daoCountArray --; #endif DArray_Clear( self ); dao_free( self ); }
void DaoStream_Delete( DaoStream *self ) { DaoStream_Close( self ); DString_Delete( self->fname ); DString_Delete( self->streamString ); DaoCstruct_Free( (DaoCstruct*) self ); dao_free( self ); }
void DArray_Delete( DArray *self ) { #ifdef DAO_USE_GC_LOGGER daoCountArray --; #endif DArray_Clear( self ); dao_free( self ); }
void DaoXmlParser_Delete( DaoXmlParser *self ) { DString_Delete( self->key ); DString_Delete( self->value ); DString_Delete( self->escape ); DMap_Delete( self->escapes ); dao_free( self ); }
void DaoxGraph_Delete( DaoxGraph *self ) { DaoCstruct_Free( (DaoCstruct*) self ); DList_Delete( self->nodes ); DList_Delete( self->edges ); GC_DecRC( self->nodeType ); GC_DecRC( self->edgeType ); dao_free( self ); }
void DArray_Clear( DArray *self ) { void **buf = self->items.pVoid - self->offset; DArray_DeleteItems( self, 0, self->size ); if( buf ) dao_free( buf ); self->items.pVoid = NULL; self->size = self->bufsize = 0; self->offset = 0; }
void DaoState_Delete( DaoState *self ) { DaoGC_DecRC( self->state ); DaoGC_DecRC( (DaoValue*)self->lock ); DaoGC_DecRC( (DaoValue*)self->defmtx ); DaoGC_DecRC( (DaoValue*)self->demands ); DaoCstruct_Free( (DaoCstruct*)self ); dao_free( self ); }
void DaoCinValue_Delete( DaoCinValue *self ) { #ifdef DAO_USE_GC_LOGGER DaoObjectLogger_LogDelete( (DaoValue*) self ); #endif GC_DecRC( self->cintype ); GC_DecRC( self->value ); dao_free( self ); }
void DaoXmlDOM_Delete( DaoXmlDOM *self ) { daoint i; DaoXmlDOM_Reset( self ); for(i=0; i<self->caches->size; ++i){ DaoXmlNode_Delete( (DaoXmlNode*) self->caches->items.pVoid[i] ); } DList_Delete( self->caches ); dao_free( self ); }
static void DaoMT_RoutMutexSet( DMap *mutexes ) { DNode *it; for(it=DMap_First(mutexes); it; it=DMap_Next(mutexes,it)){ DMutex *mutex = (DMutex*) it->value.pVoid; DMutex_Destroy( mutex ); dao_free( mutex ); } DMap_Delete( mutexes ); }
void DaoxDataFrame_Delete( DaoxDataFrame *self ) { int i; for(i=0; i<3; ++i) DArray_Delete( self->labels[i] ); if( self->slices ) DArray_Delete( self->slices ); DArray_Delete( self->columns ); DArray_Delete( self->caches ); GC_DecRC( self->original ); dao_free( self ); }
void DList_Clear( DList *self ) { void **buf = self->items.pVoid - self->offset; DList_DeleteItems( self, 0, self->size ); if( self->type == DAO_DATA_VALUE ) DaoGC_LockData(); if( buf ) dao_free( buf ); self->items.pVoid = NULL; self->size = self->bufsize = 0; self->offset = 0; if( self->type == DAO_DATA_VALUE ) DaoGC_UnlockData(); }
void DaoInterface_Delete( DaoInterface *self ) { #ifdef DAO_USE_GC_LOGGER DaoObjectLogger_LogDelete( (DaoValue*) self ); #endif if( self->concretes ) DMap_Delete( self->concretes ); GC_DecRC( self->abtype ); DList_Delete( self->supers ); DMap_Delete( self->methods ); dao_free( self ); }
static void DaoFuture_Delete( DaoFuture *self ) { DaoCstruct_Free( (DaoCstruct*) self ); GC_DecRC( self->value ); GC_DecRC( self->actor ); GC_DecRC( self->message ); GC_DecRC( self->selected ); GC_DecRC( self->process ); GC_DecRC( self->precond ); dao_free( self ); }
void DaoxWindow_Delete( DaoxWindow *self ) { //if( self->handle ) glfwDestroyWindow( self->handle ); DaoCstruct_Free( (DaoCstruct*) self ); GC_DecRC( self->context ); GC_DecRC( self->painter ); GC_DecRC( self->renderer ); GC_DecRC( self->widget ); GC_DecRC( self->model ); DString_Delete( self->title ); dao_free( self ); }
void DaoXmlNode_Delete( DaoXmlNode *self ) { daoint i; for(i=0; i<self->children->size; ++i){ DaoXmlNode_Delete( (DaoXmlNode*) self->children->items.pVoid[i] ); } DList_Delete( self->children ); DString_Delete( self->name ); DString_Delete( self->content ); DMap_Delete( self->attributes ); dao_free( self ); }
int DString_Match( DString *self, const char *pat, daoint *start, daoint *end ) { DString *str = DString_New(); DaoRegex *regex; int rc; DString_SetChars( str, pat ); regex = (DaoRegex*) dao_malloc( DaoRegex_CheckSize( str ) ); DaoRegex_Init( regex, str ); DString_Delete( str ); rc = DaoRegex_Match( regex, self, start, end ); dao_free( regex ); return rc; }
void DaoCinType_Delete( DaoCinType *self ) { #ifdef DAO_USE_GC_LOGGER DaoObjectLogger_LogDelete( (DaoValue*) self ); #endif GC_DecRC( self->abstract ); GC_DecRC( self->target ); GC_DecRC( self->citype ); GC_DecRC( self->vatype ); DList_Delete( self->supers ); DMap_Delete( self->methods ); dao_free( self ); }
void DaoxResource_Delete( DaoxResource *self ) { DaoCstruct_Free( (DaoCstruct*) self ); DMap_Delete( self->scenes ); DMap_Delete( self->lights ); DMap_Delete( self->cameras ); DMap_Delete( self->images ); DMap_Delete( self->textures ); DMap_Delete( self->effects ); DMap_Delete( self->materials ); DMap_Delete( self->geometries ); DMap_Delete( self->terrains ); dao_free( self ); }