Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
And when I run perl-script as following:#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" PerlInterpreter* my_perl; char* perl_lib_path = "/some/path/test.pm"; MODULE = TestModule PACKAGE = TestModule void upd_init(SV* perl_object) CODE: char *argv[] = {"", perl_lib_path}; my_perl = perl_alloc(); perl_construct( my_perl ); perl_parse(my_perl, NULL, 2, argv, (char **)NULL); perl_run(my_perl); dSP; ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs(perl_object); PUTBACK; call_pv("test::init", G_DISCARD); FREETMPS; LEAVE; void upd_deinit() CODE: perl_destruct(my_perl); perl_free(my_perl);
I get error: "panic: free from wrong pool."#!/usr/bin/env perl use strict; use PerlTestModule; my $ptm = new PerlTestModule(); TestLogger::upd_init($ptm);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: panic: free from wrong pool.
by cdarke (Prior) on Mar 16, 2009 at 16:24 UTC | |
|
Re: panic: free from wrong pool.
by chromatic (Archbishop) on Mar 17, 2009 at 09:23 UTC | |
by Anonymous Monk on Mar 17, 2009 at 13:35 UTC |