From 206e9d65a486e7f01e9fe32b2ef66bc4b0c22798 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 13 Jun 2008 23:20:02 +0200 Subject: Override -dealloc in every class. --- MLKDynamicContext.m | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'MLKDynamicContext.m') diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m index ed4357a..7be5748 100644 --- a/MLKDynamicContext.m +++ b/MLKDynamicContext.m @@ -17,7 +17,7 @@ ? (id) parent_member \ : nil) \ bindings:vars] \ - : (id) (parent ? (id) parent_member : nil)); + : (id) (parent ? (id) RETAIN (parent_member) : nil)); @implementation MLKDynamicContext @@ -28,7 +28,7 @@ catchTags:(NSDictionary *)catchTags currentHandler:(MLKClosure *)handler { - _parent = (aContext ? aContext : [MLKDynamicContext currentContext]); + ASSIGN (_parent, (aContext ? aContext : [MLKDynamicContext currentContext])); _environment = MAKE_ENVIRONMENT(vars, _parent, _parent->_environment); _conditionHandlers = MAKE_ENVIRONMENT(handlers, _parent, @@ -62,4 +62,15 @@ forKey:@"MLKDynamicContext"]; return context; } + +-(void) dealloc +{ + RELEASE (_conditionHandlers); + RELEASE (_restarts); + RELEASE (_catchTags); + RELEASE (_currentConditionHandler); + RELEASE (_environment); + RELEASE (_parent); + [super dealloc]; +} @end -- cgit v1.2.3