#! perl -slw
{
package Test;
use Object::InsideOut;
my @dummy :Field;
}
package main;
use threads;
use threads::shared;
print $];
print $threads::VERSION;
print $threads::shared::VERSION;
print $Object::InsideOut::VERSION;
while (1) {
my $o = new Test;
}
__END__
c:\test>junk66
5.010001
1.76
1.33
3.69
You'll see I've tried swapping things around a bit to see if it made any difference (having read the following in the O::IO docs:
If you receive an error similar to this: ERROR: Attempt to DESTROY object ID 1 of class Foo twice
the cause may be that some module used by your application is doing require threads somewhere in the background. DBI is one such module. The workaround is to add use threads; at the start of your application.
The only thing that prevented the leak was to comment out use threads::shared as you've already discovered.
I took a (brief) look inside, but that requires a PhD in O'Woe, and I failed my masters in that subject :) |