mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-21 02:31:01 +00:00
guard compilation exception and release the compiler
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@16262 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
12853b27e7
commit
f4fb09ddd5
3 changed files with 12 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
* STSourceReader: added missing [super dealloc]
|
||||
* STCompiledCode: do not retain bytecode data
|
||||
* STCompiler: various memory leak fixes
|
||||
* SmalltalkEngine: guard compilation exception and release the compiler
|
||||
|
||||
2003 Mar 23
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ extern int STCparse(void *context);
|
|||
if ([[localException name] isEqualToString: STCompilerSyntaxException])
|
||||
{
|
||||
RELEASE(reader);
|
||||
RELEASE(receiverVars);
|
||||
receiverVars = nil;
|
||||
reader = nil;
|
||||
|
||||
[NSException raise:STCompilerSyntaxException
|
||||
|
|
|
@ -70,9 +70,15 @@
|
|||
|
||||
[compiler setEnvironment:env];
|
||||
|
||||
script = [compiler compileString:sourceCode];
|
||||
retval = [script executeInEnvironment:env];
|
||||
|
||||
NS_DURING
|
||||
script = [compiler compileString:sourceCode];
|
||||
retval = [script executeInEnvironment:env];
|
||||
NS_HANDLER
|
||||
RELEASE(compiler);
|
||||
compiler = nil;
|
||||
[localException raise];
|
||||
NS_ENDHANDLER
|
||||
|
||||
RELEASE(compiler);
|
||||
|
||||
return retval;
|
||||
|
|
Loading…
Reference in a new issue