本文整理汇总了C++中Memory_Free函数的典型用法代码示例。如果您正苦于以下问题:C++ Memory_Free函数的具体用法?C++ Memory_Free怎么用?C++ Memory_Free使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Memory_Free函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _MaterialFeVariable_Build
void _MaterialFeVariable_Build( void* materialFeVariable, void* data ) {
MaterialFeVariable* self = (MaterialFeVariable*) materialFeVariable;
IntegrationPointsSwarm* swarm;
Name tmpName;
Variable_Register* variable_Register = NULL;
Stg_Component_Build( self->feMesh, data, False );
/* Create Dof Layout */
swarm = self->picIntegrationPoints;
if ( swarm->swarmVariable_Register )
variable_Register = swarm->swarmVariable_Register->variable_Register;
tmpName = Stg_Object_AppendSuffix( self, (Name)"DataVariable" );
self->dataVariable = Variable_NewScalar(
tmpName,
(AbstractContext*)self->context,
Variable_DataType_Double,
&((IGraph*)self->feMesh->topo)->remotes[MT_VERTEX]->nDomains,
NULL,
(void**)&self->data,
variable_Register );
Memory_Free( tmpName );
self->fieldComponentCount = 1;
tmpName = Stg_Object_AppendSuffix( self, (Name)"DofLayout" );
self->dofLayout = DofLayout_New( tmpName, self->context, variable_Register, ((IGraph*)self->feMesh->topo)->remotes[MT_VERTEX]->nDomains, NULL );
DofLayout_AddAllFromVariableArray( self->dofLayout, 1, &self->dataVariable );
Memory_Free( tmpName );
self->eqNum->dofLayout = self->dofLayout;
_ParticleFeVariable_Build( self, data );
}
示例2: Stg_TimeMonitor_Delete
void Stg_TimeMonitor_Delete( Stg_TimeMonitor* tm ) {
if( tm->tag ) {
Memory_Free( tm->tag );
}
Memory_Free( tm );
}
示例3: Dictionary_Entry_Value_DeleteContents
static void Dictionary_Entry_Value_DeleteContents( Dictionary_Entry_Value* self ) {
Dictionary_Entry_Value* cur = NULL;
Dictionary_Entry_Value* next = NULL;
Stream* errorStream = Journal_Register( Error_Type, "Dictionary_Entry_Value" );
switch( self->type ) {
case Dictionary_Entry_Value_Type_String:
Journal_Firewall( self->as.typeString != NULL, errorStream, "In func %s: self->as.typeString is NULL.\n", __func__ );
Memory_Free( self->as.typeString );
break;
case Dictionary_Entry_Value_Type_Struct:
Journal_Firewall( self->as.typeStruct != NULL, errorStream, "In func %s: self->as.typeStruct is NULL.\n", __func__ );
Stg_Class_Delete( self->as.typeStruct );
break;
case Dictionary_Entry_Value_Type_List:
cur = self->as.typeList->first;
while ( cur ) {
next = cur->next;
Dictionary_Entry_Value_Delete( cur );
cur = next;
}
Memory_Free( self->as.typeList );
break;
case Dictionary_Entry_Value_Type_Double:
case Dictionary_Entry_Value_Type_UnsignedInt:
case Dictionary_Entry_Value_Type_Int:
case Dictionary_Entry_Value_Type_UnsignedLong:
case Dictionary_Entry_Value_Type_Bool:
break;
default:
Journal_Firewall( False, errorStream, "In func %s: self->type '%d' is invalid.\n", __func__, self->type );
};
}
示例4: Journal_Printf
/* Journal_Printf( stream, "\tNodeCount\t\t - %d\n", self->nodeCount );
Journal_Printf( stream, "\tLinkedList Order\t - %s\n", (self->listOrder == LINKEDLIST_SORTED)?"SORTED":"UNSORTED" );
Journal_Printf( stream, "\tLinkedList data\t - \n");
if (self->dataPrintFunction)
LinkedList_ParseList( self, (LinkedList_parseFunction*)self->dataPrintFunction, (void*)stream );
}
*/
int LinkedList_DeleteAllNodes( LinkedList *list )
{
LinkedList *self = NULL;
LinkedListNode *curr = NULL, *temp = NULL;
self = (LinkedList*)list;
assert (self);
curr = self->head;
while (curr != NULL){
temp = curr->next;
if (self->dataDeleteFunction){
self->dataDeleteFunction( curr->data );
}
else{
Memory_Free(curr->data);
}
Memory_Free( curr ); /** Freeing the Node without calling the Stg_Class_Delete function, because LinkedList_Node does not inherit __Stg_Class */
curr = temp;
--self->nodeCount;
}
self->head = NULL;
return 0;
}
示例5: _ConstitutiveMatrixCartesian_Destroy
void _ConstitutiveMatrixCartesian_Destroy( void* constitutiveMatrix, void* data ) {
ConstitutiveMatrixCartesian* self = (ConstitutiveMatrixCartesian*)constitutiveMatrix;
Memory_Free( self->Dtilda_B );
Memory_Free( self->Ni );
_ConstitutiveMatrix_Destroy( constitutiveMatrix, data );
}
示例6: _ViscousPenaltyConstMatrixCartesian_Destroy
void _ViscousPenaltyConstMatrixCartesian_Destroy( void* constitutiveMatrix, void* data ) {
ViscousPenaltyConstMatrixCartesian* self = (ViscousPenaltyConstMatrixCartesian*)constitutiveMatrix;
_ConstitutiveMatrix_Destroy( constitutiveMatrix, data );
Memory_Free( self->Dtilda_B );
Memory_Free( self->Ni );
}
示例7: _Matrix_NaiNbj_Destroy
void _Matrix_NaiNbj_Destroy( void* constitutiveMatrix, void* data ) {
Matrix_NaiNbj* self = (Matrix_NaiNbj*)constitutiveMatrix;
_ConstitutiveMatrix_Destroy( constitutiveMatrix, data );
Memory_Free( self->Dtilda_B );
Memory_Free( self->Ni );
}
示例8: _Biquadratic_Destroy
void _Biquadratic_Destroy( void* elementType, void* data ) {
Biquadratic* self = (Biquadratic*)elementType;
Memory_Free( self->faceNodes );
Memory_Free( self->evaluatedShapeFunc );
Memory_Free( self->GNi );
_ElementType_Destroy( elementType, data );
}
示例9: _VariableCondition_Destroy
void _VariableCondition_Destroy( void* variableCondition, void* data ) {
VariableCondition* self = (VariableCondition*)variableCondition;
if (self->mapping) Stg_Class_Delete(self->mapping);
if (self->_set) Stg_Class_Delete(self->_set);
if (self->indexTbl) Memory_Free(self->indexTbl);
if (self->vcVarCountTbl) Memory_Free(self->vcVarCountTbl);
if (self->vcTbl) Memory_Free(self->vcTbl);
if (self->valueTbl) Memory_Free(self->valueTbl);
}
示例10: StreamFormatter_Buffer_Delete
void StreamFormatter_Buffer_Delete( StreamFormatter_Buffer* buffer ) {
if ( buffer->buffer1 != NULL ) {
Memory_Free( buffer->buffer1 );
}
if ( buffer->buffer2 != NULL ) {
Memory_Free( buffer->buffer2 );
}
Memory_Free( buffer );
}
示例11: _ConvexHull_Destroy
void _ConvexHull_Destroy( void* convexHull, void* data ) {
ConvexHull* self = (ConvexHull*)convexHull;
Coord_List vertexList = self->vertexList;
XYZ* facesList = self->facesList;
Memory_Free( vertexList );
Memory_Free( facesList );
_Stg_Shape_Destroy( self, data );
}
示例12: _TrilinearElementType_Destroy
void _TrilinearElementType_Destroy( void* elementType, void *data ){
TrilinearElementType* self = (TrilinearElementType*)elementType;
Memory_Free( self->faceNodes );
Memory_Free( self->evaluatedShapeFunc );
Memory_Free( self->GNi );
FreeArray( self->tetInds );
_ElementType_Destroy( self, data );
}
示例13: _LinearSpaceAdaptor_Destroy
void _LinearSpaceAdaptor_Destroy( void* _self, void* data ) {
LinearSpaceAdaptor* self = (LinearSpaceAdaptor*)_self;
if( self->nSegmentsx > 0 )
Memory_Free( self->tablex );
if( self->nSegmentsy > 0 )
Memory_Free( self->tabley );
if( self->nSegmentsz > 0 )
Memory_Free( self->tablez );
_MeshAdaptor_Destroy( self, data );
}
示例14: _MemoryPool_DeleteFunc
void _MemoryPool_DeleteFunc( void *memPool )
{
MemoryPool *self = NULL;
self = (MemoryPool*)memPool;
assert (self);
Memory_Free( self->elements );
Memory_Free( self->pool );
_Stg_Class_Delete( self );
}
示例15: VariableSuite_Teardown
void VariableSuite_Teardown( VariableSuiteData* data ) {
Variable_Index var_I;
/* manually delete all the created Variables */
for( var_I = 0; var_I < data->vr->count; var_I++ ) {
Stg_Class_Delete( data->vr->_variable[var_I] );
}
Memory_Free( data->particle );
Memory_Free( data->velocity );
Memory_Free( data->temperature );
}