mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-14 03:34:16 +01:00
use chunks for cleanup
This commit is contained in:
parent
41e73d6fba
commit
8c8c3509d3
4 changed files with 66 additions and 44 deletions
|
|
@ -40,12 +40,16 @@ public sealed class BlockFileDataStream : Stream
|
|||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
foreach (var substream in _substreams)
|
||||
if (disposing)
|
||||
{
|
||||
// probably unnecessary but better safe than sorry
|
||||
substream.Dispose();
|
||||
foreach (var substream in _substreams)
|
||||
{
|
||||
// probably unnecessary but better safe than sorry
|
||||
substream.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue