summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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