diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-07 20:47:37 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-07 20:47:37 +0200 |
commit | a277a977dc9d036dba3498ee5459803da1cc2c8d (patch) | |
tree | 6f6948e4f35bcd367ed95164125b6909282c0a73 | |
parent | 58e11e991bf74232f7fe316b2693f46892bb0af9 (diff) |
Implement -finalize methods where appropriate.
-rw-r--r-- | MLKCompiledProcedure.h | 1 | ||||
-rw-r--r-- | MLKCompiledProcedure.m | 6 | ||||
-rw-r--r-- | MLKCons.h | 2 | ||||
-rw-r--r-- | MLKForeignProcedure.h | 1 | ||||
-rw-r--r-- | MLKForeignProcedure.m | 7 |
5 files changed, 16 insertions, 1 deletions
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 @@ -21,7 +21,7 @@ @class NSArray; -@interface MLKCons : MLKLispValue +@interface MLKCons : MLKLispValue <NSCopying> { 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 |