diff options
-rw-r--r-- | MLKReadEvalPrintLoop.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m index 1d79a2f..a32f066 100644 --- a/MLKReadEvalPrintLoop.m +++ b/MLKReadEvalPrintLoop.m @@ -22,7 +22,9 @@ #import "MLKPackage.h" #import "MLKReadEvalPrintLoop.h" #import "MLKReader.h" +#import "runtime-compatibility.h" +#import <Foundation/NSAutoreleasePool.h> #import <Foundation/NSString.h> #import <editline/history.h> @@ -68,9 +70,12 @@ static const char *prompt (EditLine *e) { if (line_length > 0) { + NSAutoreleasePool *pool; NSString *result; id code; + pool = [[NSAutoreleasePool alloc] init]; + history (commands, &event, H_ENTER, line); code = [MLKReader readFromString:result]; result = [MLKInterpreter eval:code @@ -78,6 +83,8 @@ static const char *prompt (EditLine *e) { globalContext] withEnvironment:[MLKLexicalEnvironment globalEnvironment]]; + + RELEASE (pool); } //free (line); |