当前位置: 首页>>代码示例>>C++>>正文


C++ Memory_Free函数代码示例

本文整理汇总了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 );
}
开发者ID:underworldcode,项目名称:underworld1,代码行数:33,代码来源:MaterialFeVariable.c

示例2: Stg_TimeMonitor_Delete

void Stg_TimeMonitor_Delete( Stg_TimeMonitor* tm ) {
	if( tm->tag ) {
		Memory_Free( tm->tag );
	}
	
	Memory_Free( tm );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:7,代码来源:TimeMonitor.c

示例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 );
	};
}
开发者ID:bmi-forum,项目名称:bmi-pyre,代码行数:33,代码来源:Dictionary_Entry_Value.c

示例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;
}
开发者ID:aayushkumar,项目名称:Parallel-Programming-Project,代码行数:35,代码来源:LinkedList.c

示例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 );
}
开发者ID:AngelValverdePerez,项目名称:underworld2,代码行数:8,代码来源:ConstitutiveMatrixCartesian.cpp

示例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 );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:8,代码来源:ViscousPenaltyConstMatrixCartesian.c

示例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 );
}
开发者ID:dansand,项目名称:underworld2,代码行数:8,代码来源:Matrix_NaiNbj.c

示例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 );
}
开发者ID:AngelValverdePerez,项目名称:underworld2,代码行数:9,代码来源:Biquadratic.c

示例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);
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:10,代码来源:VariableCondition.c

示例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 );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:10,代码来源:StreamFormatter.c

示例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 );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:10,代码来源:ConvexHull.c

示例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 );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:11,代码来源:TrilinearElementType.c

示例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 );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:12,代码来源:linearSpaceAdaptor.c

示例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 );
}
开发者ID:bmi-forum,项目名称:bmi-pyre,代码行数:12,代码来源:MemoryPool.c

示例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 );
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:12,代码来源:VariableSuite.c


注:本文中的Memory_Free函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。