• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Memory_Free函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Memory_Free函数的典型用法代码示例。如果您正苦于以下问题:C++ Memory_Free函数的具体用法?C++ Memory_Free怎么用?C++ Memory_Free使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Memory_Free函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: _Geothermal_FieldMaps_Destroy

void _Geothermal_FieldMaps_Destroy( void* component, void* data ) {
   Geothermal_FieldMaps* self = (Geothermal_FieldMaps*)component;
   unsigned map_i;
   
   for( map_i = 0; map_i < self->numMaps; map_i++ ) {
      Memory_Free( self->maps[map_i]->nodeValues );
      Memory_Free( self->maps[map_i]->nodeCoords );
      free( self->maps[map_i] );
   }
   if( self->maps ) {
      free( self->maps );
   }
}
开发者ID:underworldcode,项目名称:underworld1,代码行数:13,代码来源:FieldMaps.c


示例17: _Stg_ComponentFactory_PluginConstructByKey

Stg_Component* _Stg_ComponentFactory_PluginConstructByKey( 
   void*                  cf, 
   void*                  codelet, 
   Dictionary_Entry_Key   componentKey,
   Type                  type, 
   Bool                  isEssential,
   void*                  data ) 
{
   Stg_ComponentFactory*   self = (Stg_ComponentFactory*)cf;
   Stg_Component*            plugin = (Stg_Component*)codelet;
   Dictionary*               thisPluginDict = NULL;
   Dictionary*               pluginDict = (Dictionary*)Dictionary_Get( self->rootDict, "plugins" );
   Name                     componentName, redirect, pluginType;
   Dictionary_Entry_Value*   componentEntryVal;
   Index                     pluginIndex;
   Stream*                  errorStream = Journal_Register( Error_Type, self->type );

   Journal_Firewall( self != NULL, errorStream, "In func %s: Stg_Component is NULL.\n", __func__ );

   /* Get this plugins Dictionary */
   for( pluginIndex = 0; pluginIndex < Dictionary_Entry_Value_GetCount( (Dictionary_Entry_Value*)pluginDict ); pluginIndex++ ) {
      thisPluginDict = Dictionary_Entry_Value_AsDictionary( Dictionary_Entry_Value_GetElement( (Dictionary_Entry_Value*)pluginDict, pluginIndex ) );
      pluginType = StG_Strdup( Dictionary_GetString( thisPluginDict, "Type" ) );

      if( !strcmp( plugin->type, pluginType ) ){
         Memory_Free( pluginType );
         break;
      }
      Memory_Free( pluginType );
   }
   
   /* Get Dependency's Name */
   componentEntryVal = Dictionary_Get( thisPluginDict, componentKey );
   if ( componentEntryVal == NULL ) {
      Journal_Firewall( !isEssential, errorStream,
            "plugin '%s' cannot find essential component with key '%s'.\n", plugin->type, componentKey );
      Journal_PrintfL( self->infoStream, 2, "plugin '%s' cannot find non-essential component with key '%s'.\n", plugin->type, componentKey );
      return NULL;
   }
      
   componentName = Dictionary_Entry_Value_AsString( componentEntryVal );

   /* If we can find the component's name in the root dictionary, use that value instead. */
   if( self->rootDict ) {
      redirect = Dictionary_GetString_WithDefault( self->rootDict, componentName, "" );
      if( strcmp( redirect, "" ) )
         componentName = redirect;
   }

   return self->constructByName( self, componentName, type, isEssential, data );
}
开发者ID:dansand,项目名称:underworld2,代码行数:51,代码来源:Stg_ComponentFactory.c


示例18: GUI_FreeNode

void GUI_FreeNode( TGUINode * node ) {
    if( node->button ) {
        GUI_FreeNode( node->button->text );
        GUI_FreeNode( node->button->background );
        Memory_Free( node->button );
    }
    if( node->text ) {
        Memory_Free( node->text );
    }
    if( node->rect ) {
        Memory_Free( node->rect );
    }
    Memory_Free( node );
}
开发者ID:mrDIMAS,项目名称:OldTech,代码行数:14,代码来源:gui.c


示例19: StGermainBase_Init

Bool StGermainBase_Init( int* argc, char** argv[] ) {
   char* directory;
   int   tmp;
   
   /* Initialise enough bits and pieces to get IO going */
   BaseFoundation_Init( argc, argv );
   BaseIO_Init( argc, argv );

   /* Write out the copyright message */

   
   Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ );
   tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, "Context" ) );
   Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), 0 );
 
   Stream_Flush( Journal_Register( InfoStream_Type, "Context" ) );
   Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), tmp );
   
   /* Initialise the remaining bits and pieces */
   BaseContainer_Init( argc, argv );
   BaseAutomation_Init( argc, argv );
   BaseExtensibility_Init( argc, argv );
   BaseContext_Init( argc, argv );
   
   /* Add the StGermain path to the global xml path dictionary */
   directory = Memory_Alloc_Array( char, 200, "xmlDirectory" ) ;
   sprintf( directory, "%s%s", LIB_DIR, "/StGermain" );
   XML_IO_Handler_AddDirectory( "StGermain", directory  );
   Memory_Free( directory );
   
   /* Add the plugin path to the global plugin list */
   ModulesManager_AddDirectory( "StGermain", LIB_DIR );
   
   return True;
}
开发者ID:AngelValverdePerez,项目名称:underworld2,代码行数:35,代码来源:Init.c


示例20: MaxHeapSuite_Teardown

void MaxHeapSuite_Teardown( MaxHeapSuiteData* data ) {
   Stg_Class_Delete( data->heap );
   Memory_Free( data->dataArray );
   /* Note: _Heap_Delete() (Heap.c:144) already frees the keys array. Not sure this is entirely logical - needs to
    *  be well doco'd at least */
   /*Memory_Free( data->keys );*/
}
开发者ID:OlympusMonds,项目名称:EarthByte_Underworld,代码行数:7,代码来源:MaxHeapSuite.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Memory_free函数代码示例发布时间:2022-05-30
下一篇:
C++ MemoryUsage函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap