Entering edit mode
9.7 years ago
timofeevbog
▴
30
I am using htsjdk.variant.vcf.VCFFileReader class to parse .vcf document, so I've got a constructor
VCFFileReader vcfReader = new VCFFileReader(inputFile, false);
and some code like
for (VariantContext variantContext : vcfReader) {
//..
}
vcfReader.close()
Unfortunately, my file isn't released after I close VCFReader (even if it is an empty cycle), but in construction like
VCFFileReader vcfReader = new VCFFileReader(inputFile, false);
vcfReader.close();
Everything is ok. Does anybody know how to solve it?
Thanks
Are you sure the code gets to vcfReader.close()?
Yes, it gets
how do you know that the file isn't realeased ? an exception ? what's in the loop ?
I can't delete my file after vcfReader.close()
Are you sure nothing else is accessing it? What does
lsof
say?