summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-07 20:47:37 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-07 20:47:37 +0200
commita277a977dc9d036dba3498ee5459803da1cc2c8d (patch)
tree6f6948e4f35bcd367ed95164125b6909282c0a73
parent58e11e991bf74232f7fe316b2693f46892bb0af9 (diff)
Implement -finalize methods where appropriate.
-rw-r--r--MLKCompiledProcedure.h1
-rw-r--r--MLKCompiledProcedure.m6
-rw-r--r--MLKCons.h2
-rw-r--r--MLKForeignProcedure.h1
-rw-r--r--MLKForeignProcedure.m7
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
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 <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