aardvark-platform / aardvark.algodat

Aardvark.Algodat contains advanced geometric and photometric data structures and algorithms. It is part of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
https://aardvarkians.com/
GNU Affero General Public License v3.0
34 stars 6 forks source link

PointFileInfo<E57FileHeader> not closing file stream #22

Closed rickrain closed 2 years ago

rickrain commented 2 years ago

This method is opening a FileStream here but it doesn't close it.

We're able to work around this by forcing a System.GC.Collect() call, but would prefer not to have to do that.

stefanmaierhofer commented 2 years ago

Hi @rickrain You are right, this seems a little bit strange. Would you be so kind to provide a link to your code base or repository where this is used, so I can make sure to fully understand the context before making any changes. Thanks, Stefan

rickrain commented 2 years ago

Hi @stefanmaierhofer, I don't have a repo to point you to. Was just experimenting with something and ran into this. For additional context, I used PointFileInfo and then later tried to delete the file. But, since the file handle is left open the delete fails.

I just submitted PR #23 for review.

stefanmaierhofer commented 2 years ago

Hi @rickrain, I just merged your pull request. If all goes well, our CI pipeline should publish new Nuget packages (version 5.2.5) in a few minutes.

stefanmaierhofer commented 2 years ago

https://www.nuget.org/packages/Aardvark.Data.E57/5.2.5