From ddf15826a5c2d7e2c1800ca976ffaa4049b29993 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 25 Aug 2008 14:31:20 +0200 Subject: MLKForm class cluster: Add missing pieces of memory management. --- MLKForm.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.2.3