[Bioperl-l] Bio::Root::RootI::DESTROY -> Bio::Root::Root::_cleanup_methods

Jason Stajich jason@cgt.mc.duke.edu
Mon, 30 Sep 2002 09:36:42 -0400 (EDT)


On Mon, 30 Sep 2002, Tim Bunce wrote:

> A couple of quick questions after another skim through the Bio::Root code...
>
> Are cleanup methods used? If so, what for (typically)?
>

Cleaning up tempfiles basically -- this is a kludge with multiple
inheritance where we would get 2 DESTROY methods and the toplevel
Bio::Root::IO object which held the handles to the tempfiles wasn't
getting its destroy methods called.  This is only really a problem for
objects which extend rather than use Bio::Root::IO - I'm thinking it makes
more sense for our IO users to have-an IO object rather than extend one,
foggy braing this morning so I'm not sure of all the pros+cons.

We have this whole register cleanup methods structure to get around the
multiple DESTROY problem.

> Why do some classes, like Bio::Seq, define an empty DESTROY method
> (and thereby prevent super class DESTROY or cleanup methods being called)?
>

To deal with AUTOLOAD somehow I think -- I don't remember why exactly.
We can comment it out and see what whines again, I've since forgotten.



> Tim.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason at cgt.mc.duke.edu