[cig-commits] commit: This change passes all the tests and frees more mem, so I'm leaving it in

Mercurial hg at geodynamics.org
Mon Feb 1 15:33:00 PST 2010


changeset:   737:bd21742a2f76
branch:      pcu_rejig
user:        JulianGiordani
date:        Mon Dec 14 17:20:37 2009 +1100
files:       Base/Foundation/src/Class.c
description:
This change passes all the tests and frees more mem, so I'm leaving it in


diff -r 56ba154d2aa2 -r bd21742a2f76 Base/Foundation/src/Class.c
--- a/Base/Foundation/src/Class.c	Mon Dec 14 15:03:15 2009 +1100
+++ b/Base/Foundation/src/Class.c	Mon Dec 14 17:20:37 2009 +1100
@@ -99,8 +99,9 @@ void _Stg_Class_Delete( void* _class ) {
 	if( self->_deleteSelf ) {
 		Memory_CountDec( self );
 
+      Memory_Free( self );
 		if ( Memory_CountGet( self ) <= 0 ) {
-			Memory_Free( self );
+			//Memory_Free( self );
 		}
 	}
 }
@@ -201,6 +202,7 @@ void* _Stg_Class_Copy( void* _class, voi
 	newClass->_delete = self->_delete;
 	newClass->_print = self->_print;
 	newClass->_copy = self->_copy;
+	newClass->nRefs = self->nRefs;
 	
 	return (void*)newClass;
 }



More information about the CIG-COMMITS mailing list