vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
454 stars 72 forks source link

fixbug: save obj file streamwriter has no close #234

Closed jackletter closed 1 month ago

vpenades commented 1 month ago

Thanks for your bugfix, but in its current state I cannot merge it, because it does not follow good programming practices.

streams need to be closed/disposed by the same function that opened them to ensure the stream is properly handled.

So the right way to do it is to expand the lambda funciont and dispose the stream after having called the _GetGeometryContent method.

jackletter commented 1 month ago

@vpenades yes, you are wright, but the bug need fix, otherwise the *.obj file is incomplete

vpenades commented 1 month ago

I'll give a look at the wavefront and figure out another way of fixing this

vpenades commented 1 month ago

I've been able to fix it on my end, so this pull request is no longer neccesary.

Thanks for hilighting the issue.