core
core copied to clipboard
May be a memory leak in PbfReader ?
Hi
May be there is a memory issue inside the PbfReader!
https://github.com/OsmSharp/core/blob/b9a3e5b701c49e47b06e0937c0e4297dd077e3c5/src/OsmSharp/IO/PBF/PBFReader.cs#L114-L133
The MemoryStream in Line 114 seems never be disposed, because the ZLibStreamWrapper seems to not close/dispose the wrapped stream!
OK, may be the GC solves this problem later in time, but (Memory) streams should be disposed asap...
i hope this helps...
br Werner
Hi, see: https://stackoverflow.com/questions/4195746/memorystream-must-be-explicitely-be-disposed