Free to wrong pool 15dd170 not 15d2750 during global destruction.

G

Gavin Williams

Experiencing a problem when using the Win32::OLE and the threads module in
the same script.

As soon as the a thread terminates I get an error "Free to wrong pool
15dd170 not 15d2750 during global destruction."

Would appreciate some input on how to resolve this.

Here is a very simple script you can use to demonstrate the problem with:

#--------------------------------------------------------------------
use Win32::OLE ;
use threads ;

sub dostuff {
print "Stuff\n" ;
return 1 ;
}

sub startthr {
my $thr = threads->new( \&dostuff ) ;
our $tid = $thr->tid ;
}

sub stopthr {
our $tid ;
my $thr = threads->object( $tid ) ;
my $result = $thr->join ;
undef $thr ;
undef $tid ;
}

print "Starting thread\n" ;
startthr() ;
sleep(10) ;
print "Stopping thread\n" ;
stopthr() ;
print "A memory pool error should have occurred, and this line will
probably not print.\n"
#--------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top