summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-25 14:31:20 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-25 14:31:20 +0200
commitddf15826a5c2d7e2c1800ca976ffaa4049b29993 (patch)
tree9313cad772c10422e5a2c99fabf72faf39a116b6
parent865c8a08dc0782afa69f0b5c91329fabce29daec (diff)
MLKForm class cluster: Add missing pieces of memory management.
-rw-r--r--MLKForm.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/MLKForm.m b/MLKForm.m
index 6fc3152..edf3368 100644
--- a/MLKForm.m
+++ b/MLKForm.m
@@ -84,6 +84,14 @@
{
return [NSArray array];
}
+
+-(void) dealloc
+{
+ LDESTROY (_form);
+ LDESTROY (_context);
+ LDESTROY (_compiler);
+ [super dealloc];
+}
@end
@@ -287,6 +295,9 @@
-(void) splitDeclarationsAndBody:(id)object
{
MLKSplitDeclarationsDocAndForms(&_declarations, NULL, &_body, object, NO);
+ LRETAIN (_declarations);
+ LRETAIN (_body);
+ _declarationForms = nil;
}
-(id) declarationsWithForms:(id)object
@@ -313,6 +324,9 @@
-(void) splitDeclarationsAndBody:(id)object
{
MLKSplitDeclarationsDocAndForms(&_declarations, &_documentation, &_body, object, YES);
+ LRETAIN (_declarations);
+ LRETAIN (_body);
+ _declarationForms = nil;
}
-(void) dealloc