void destroySWFPlaceObject2Block(SWFPlaceObject2Block place) { if ( place->actions != NULL ) free(place->actions); if ( place->actionFlags != NULL ) /* { free(place->actionChars); */ free(place->actionFlags); /* } */ if( place->filterList != NULL ) destroySWFFilterList(place->filterList); if ( place->name != NULL ) free(place->name); if ( place->out != NULL ) destroySWFOutput(place->out); if ( place->matrix != NULL ) destroySWFMatrix(place->matrix); if ( place->cXform != NULL ) destroySWFCXform(place->cXform); #if TRACK_ALLOCS ming_gc_remove_node(place->gcnode); #endif free(place); }
/* * destroy a SWFMovie * This function destroys a SWFMovie and frees the memmory associated with it */ void destroySWFMovie(SWFMovie movie /* Movie to be destroyed */) { destroySWFBlockList(movie->blockList); destroySWFDisplayList(movie->displayList); destroySWFRect(movie->bounds); if ( movie->nExports > 0 ) destroySWFExports(movie); if ( movie->fonts != NULL ) free(movie->fonts); if (movie->imports) free(movie->imports); if(movie->fattrs) destroySWFFileAttributes(movie->fattrs); if(movie->limits) destroySWFScriptLimits(movie->limits); if(movie->backgroundBlock) destroySWFBlock(movie->backgroundBlock); #if TRACK_ALLOCS ming_gc_remove_node(movie->gcnode); #endif free(movie); }
void destroySWFFill(SWFFill fill) { destroySWFPosition(fill->position); #if TRACK_ALLOCS ming_gc_remove_node(fill->gcnode); #endif free(fill); }
/* * destroy a SWFMovieClip instance */ void destroySWFMovieClip(SWFMovieClip movieClip) { #if TRACK_ALLOCS ming_gc_remove_node(movieClip->gcnode); #endif destroySWFBlockList(movieClip->blockList); destroySWFDisplayList(movieClip->displayList); destroySWFSprite((SWFSprite)movieClip); }
static void destroySWFDBLBitmapData(SWFDBLBitmapData bitmap) { if ( bitmap->data != NULL ) { free(bitmap->data); } #if TRACK_ALLOCS ming_gc_remove_node(bitmap->gcnode); #endif destroySWFCharacter((SWFCharacter) bitmap); }
void destroySWFShape(SWFShape shape) { int i; if(shape->fills != NULL) { // Fills have to be destroyed by users. /* for ( i=0; i<shape->nFills; ++i ) destroySWFFillStyle(shape->fills[i]); */ free(shape->fills); } if(shape->records != NULL) { for(i = 0; i < shape->nRecords; i++) { free(shape->records[i].record.stateChange); } free(shape->records); } if(shape->edgeBounds != NULL) free(shape->edgeBounds); for ( i=0; i<shape->nLines; ++i ) free(shape->lines[i]); if ( shape->lines != NULL ) free(shape->lines); destroySWFOutput(shape->out); #if TRACK_ALLOCS ming_gc_remove_node(shape->gcnode); #endif destroySWFCharacter((SWFCharacter) shape); }
void destroySWFText(SWFText text) { SWFTextRecord record = text->initialRecord, next; destroySWFOutput(text->out); if ( text->matrix != NULL ) destroySWFMatrix(text->matrix); while ( record != NULL ) { next = record->next; destroySWFTextRecord(record); record = next; } #if TRACK_ALLOCS ming_gc_remove_node(text->gcnode); #endif destroySWFCharacter((SWFCharacter) text); }
void destroySWFShape(SWFShape shape) { int i, j; destroySWFOutput(shape->out); if (shape->isUsingNewStyles != TRUE) { for ( i=0; i<*shape->nFills; ++i ) { SWFMatrix matrix = SWFFillStyle_getMatrix((*shape->fills)[i]); if ( matrix != NULL ) destroySWFMatrix(matrix); /* gradients and bitmaps are destroyed separately */ free((*shape->fills)[i]); } if ( *shape->fills != NULL ) free(*shape->fills); for ( i=0; i<*shape->nLines; ++i ) free((*shape->lines)[i]); if ( *shape->lines != NULL ) free(*shape->lines); } if (shape->isEnded != TRUE) { for ( i=0; i<shape->nRecords; ++i ) { ShapeRecord record = shape->records[i]; if (record.type == SHAPERECORD_STATECHANGE && record.record.stateChange->flags & SWF_SHAPE_NEWSTYLEFLAG) { for ( j=0; i<record.record.stateChange->nFills; ++j ) { SWFMatrix matrix = SWFFillStyle_getMatrix(record.record.stateChange->fills[j]); if ( matrix != NULL ) destroySWFMatrix(matrix); /* gradients and bitmaps are destroyed separately */ free(record.record.stateChange->fills[j]); } if ( record.record.stateChange->fills != NULL ) free(record.record.stateChange->fills); for ( j=0; j<record.record.stateChange->nLines; ++j ) free(record.record.stateChange->lines[j]); if ( record.record.stateChange->lines != NULL ) free(record.record.stateChange->lines); } free(record.record.stateChange); /* all in union are pointers */ } free(shape->records); } #if TRACK_ALLOCS ming_gc_remove_node(shape->gcnode); #endif destroySWFCharacter((SWFCharacter) shape); }