brittneybrinsfield / pysam

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

Memory Leak In IteratorRowRegion #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I believer there may be a memory leak in the IteratorRowRegion class.

The following line is called in the constructor to create a bam_iter_t struct.

self.iter = bam_iter_query(self.samfile.index, 
                                   tid, 
                                   beg, 
                                   end)
However bam_iter_destroy() is never called in the __dealloc__ method.

Original issue reported on code.google.com by AndrewJL...@gmail.com on 26 Jan 2012 at 8:54

GoogleCodeExporter commented 9 years ago
Indeed, very well spotted.

For each iteration there was a leak of one pointer.

Best wishes,
Andreas

Original comment by andreas....@gmail.com on 10 Jul 2012 at 9:19