[cig-commits] commit: cleaning up delete/destroy

Mercurial hg at geodynamics.org
Mon Feb 1 15:30:45 PST 2010


changeset:   321:d49cc2534020
branch:      pcu_rejig
user:        JohnMansour <john.mansour at maths.monash.edu.au>
date:        Fri Nov 20 11:55:33 2009 +1100
files:       MaterialPoints/src/ParticleFeVariable.c
description:
cleaning up delete/destroy


diff -r 452496845feb -r d49cc2534020 MaterialPoints/src/ParticleFeVariable.c
--- a/MaterialPoints/src/ParticleFeVariable.c	Thu Nov 19 16:57:02 2009 +1100
+++ b/MaterialPoints/src/ParticleFeVariable.c	Fri Nov 20 11:55:33 2009 +1100
@@ -164,6 +164,9 @@ void _ParticleFeVariable_Init( ParticleF
 /* --- Virtual Function Implementations --- */
 void _ParticleFeVariable_Delete( void* materialFeVariable ) {
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
+
+	Memory_Free( self->assemblyVectorName );
+	Memory_Free( self->massMatrixName );
 
 	_FeVariable_Delete( self );
 }
@@ -264,13 +267,11 @@ void _ParticleFeVariable_Destroy( void* 
 void _ParticleFeVariable_Destroy( void* materialFeVariable, void* data ) {
 	ParticleFeVariable* self = (ParticleFeVariable*) materialFeVariable;
 
-	Stg_Class_Delete( self->assemblyVector );
-	Memory_Free( self->assemblyVectorName );
-	Stg_Class_Delete( self->assemblyTerm );
+	Stg_Component_Destroy( self->assemblyVector, data, False );
+	Stg_Component_Destroy( self->assemblyTerm, data, False );
 
-	Stg_Class_Delete( self->massMatrix );
-	Memory_Free( self->massMatrixName );
-	Stg_Class_Delete( self->massMatrixForceTerm );
+	Stg_Component_Destroy( self->massMatrix, data, False );
+	Stg_Component_Destroy( self->massMatrixForceTerm, data, False );
 
 	_FeVariable_Destroy( self, data );
 }



More information about the CIG-COMMITS mailing list