From a277a977dc9d036dba3498ee5459803da1cc2c8d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 7 Aug 2008 20:47:37 +0200 Subject: Implement -finalize methods where appropriate. --- MLKCompiledProcedure.h | 1 + MLKCompiledProcedure.m | 6 ++++++ MLKCons.h | 2 +- MLKForeignProcedure.h | 1 + MLKForeignProcedure.m | 7 +++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/MLKCompiledProcedure.h b/MLKCompiledProcedure.h index cb7a814..86809c1 100644 --- a/MLKCompiledProcedure.h +++ b/MLKCompiledProcedure.h @@ -38,4 +38,5 @@ -(NSString *) descriptionForLisp; -(void) dealloc; +-(void) finalize; @end diff --git a/MLKCompiledProcedure.m b/MLKCompiledProcedure.m index 1dfac0f..ee8664b 100644 --- a/MLKCompiledProcedure.m +++ b/MLKCompiledProcedure.m @@ -89,4 +89,10 @@ free (_code); [super dealloc]; } + +-(void) finalize +{ + // FIXME: Can we really just use free() here? + free (_code); +} @end diff --git a/MLKCons.h b/MLKCons.h index 3d17ff5..f2fee99 100644 --- a/MLKCons.h +++ b/MLKCons.h @@ -21,7 +21,7 @@ @class NSArray; -@interface MLKCons : MLKLispValue +@interface MLKCons : MLKLispValue { id _car; id _cdr; diff --git a/MLKForeignProcedure.h b/MLKForeignProcedure.h index d424de4..b460df3 100644 --- a/MLKForeignProcedure.h +++ b/MLKForeignProcedure.h @@ -44,4 +44,5 @@ -(NSString *) descriptionForLisp; -(void) dealloc; +-(void) finalize; @end diff --git a/MLKForeignProcedure.m b/MLKForeignProcedure.m index c9cd5d6..248a184 100644 --- a/MLKForeignProcedure.m +++ b/MLKForeignProcedure.m @@ -115,4 +115,11 @@ free (_argumentTypes); [super dealloc]; } + +-(void) finalize +{ + // FIXME: Can we really just use free() here? + free (_code); + free (_argumentTypes); +} @end -- cgit v1.2.3