Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleanup the perl5 interpreter in Perl5Interpreter destructor

  • Loading branch information...
commit 16ef0c81565818305a70c9232ed01383fb33d010 1 parent 9fccf74
@pmurias pmurias authored
Showing with 6 additions and 0 deletions.
  1. +3 −0  lib/Perl5Interpreter.cs
  2. +3 −0  lib/p5embed.c
View
3  lib/Perl5Interpreter.cs
@@ -14,6 +14,9 @@ public class Perl5Interpreter : IForeignInterpreter {
public Perl5Interpreter() {
Initialize();
}
+ ~Perl5Interpreter() {
+ Dispose();
+ }
public void Eval(string code) {
EvalPerl5(code);
}
View
3  lib/p5embed.c
@@ -35,4 +35,7 @@ void p5embed_eval(char* code) {
void p5embed_dispose()
{
+ perl_destruct(my_perl);
+ perl_free(my_perl);
+ PERL_SYS_TERM();
}
Please sign in to comment.
Something went wrong with that request. Please try again.