[Bioperl-l] Re: [Bioperl-guts-l] [Bug 1720] New: Bug in Bio::SeqFeature::Generic.pm DESTROY causes object corruption.. fix included!

Aaron J. Mackey amackey at pcbi.upenn.edu
Fri Dec 10 07:47:28 EST 2004

if you do this:

{ my $obj = Class->new();


As that $obj goes out of scope, $obj->DESTROY is called.  After the 
scope fully ends (all possible DESTROY methods have been called), $obj 
is completely gone (it's memory may be reused, but the variable itself 
is gone)

Without looking at your code, what's likely happening is that something 
else ($obj2) is also going out of scope at the same time, and also 
being DESTROY'ed; during $obj2's destruction, it's expecting $obj to 
still be around (since the order of destruction isn't guaranteed, nor 
even predictable), and not yet DESTROY'ed.

Faith is only useful when you don't yet know the science.  There is no 
object resurrection, nor will there'll be a second coming.


On Dec 9, 2004, at 10:10 PM, bugzilla-daemon at portal.open-bio.org wrote:

> Ah, so perl is calling destroy every time through the block on all the 
> objects that were created during
> that block's execution, and then somehow reusing the objects? Does 
> anyone understand how this
> works? I'll append my script in its current form... it probably won't 
> be useful without a very large input
> file, email me directly and I'll send some over.
> Object resurrection... I've been using perl for nearly six years 
> now.... and now this is seriously shaking
> my faith. This must have been what Cardinal John Henry Newman felt 
> like before his conversion...
Aaron J. Mackey, Ph.D.
Dept. of Biology, Goddard 212
University of Pennsylvania       email:  amackey at pcbi.upenn.edu
415 S. University Avenue         office: 215-898-1205
Philadelphia, PA  19104-6017     fax:    215-746-6697

More information about the Bioperl-l mailing list