[Issue 9505] std.zlib seem to be bugged
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 13 09:25:09 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9505
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monarchdodra at gmail.com
--- Comment #3 from monarchdodra at gmail.com 2013-02-13 09:25:07 PST ---
Both implementations have the fatal flaw of closing the file on first
destruction.
This makes passing a byZChunk (first case) or a (ZFile) second case a dangerous
operation.
Look into the "File" implementation, it should be reference counted, and only
close the file on the last actual destruction.
nitpick:
Once you've named your type ZFile, calling "byChunk" byZChunk is redudant. Just
leave it at byChunk:
auto r1 = File ("SRR077487_1.filt.fastq" ).byChunk();
auto r2 = ZFile("SRR077487_1.filt.fastq.gz").byChunk();
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list