lixin6135 / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

Samfile._filename is apperantly not freed on dealloc #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Recently, the filename for SamFile was copied internally (correct)
(see http://code.google.com/p/pysam/issues/detail?id=52)
but it is not freed on dealloc/close.

    def __dealloc__( self ):
        # remember: dealloc cannot call other methods
        # note: no doc string
        # note: __del__ is not called.
        self.close()
        bam_destroy1(self.b)

should probable read

    def __dealloc__( self ):
        # remember: dealloc cannot call other methods
        # note: no doc string
        # note: __del__ is not called.
        self.close()
        bam_destroy1(self.b)

        free(self._filename)

Thanks!

Original issue reported on code.google.com by finkerna...@mathematik.uni-marburg.de on 9 Feb 2011 at 5:39

GoogleCodeExporter commented 8 years ago
Thanks, had already been added to dev-0.4, but did forget to apply for 
rel-0.3.1. Will release 0.4 shortly.

Bw,
Andreas

Original comment by andreas....@gmail.com on 10 Feb 2011 at 10:54