Comments (5)
The IOStream can either be deleted explicitly, or closed via IOHandler::Close; in theory, they should accomplish the same thing. However, that seems overly ambiguous, and places an unnecessary burden on implementers of IOStream/IOHandler to properly handle both use-cases.
What if instead, we always returned a scoped_ptr from IOHandler::Open, removed the IOHandler::Close method completely, and made the IOStream destructor solely responsible for cleanup. Thoughts? This enforces consistent usage for all clients of IOHandler.
from assimp.
A std::unique_ptr
would probably be a solution, unfortunately we cannot switch to C++11 for any forseeable future. A scoped_ptr
is not intended to be returned at all (and without move semantics it makes no sense either).
Personally, I would just drop the Close()
and let the destructor do it.
from assimp.
Yeah, that sounds reasonable.
from assimp.
I actually call Close on the destructor. So I also agree Close can go. But the issue remain because the IOStream is never destructed.
I currently worked around it by keeping an instance of the IOStream I create in IOSystem and destroy it when IOSystem is destroyed or before opening a new one...
it's probably wrong for some use case but works for mine because I have to load only one IOStream at the time.
from assimp.
Ok, I take it partially back.
Close is never called.
But the destructor of the IOStream is
from assimp.
Related Issues (20)
- Bug: DXF conversion assigns incorrect colors HOT 2
- Bug: FBX Export requires writing each mesh to a separate node.
- Bug: broken fbx animation HOT 1
- Bug: loading a obj format model has crashed(mingw gcc) HOT 5
- Bug: loading a obj format model's faces data crashed(OpenGL) HOT 7
- Bug: Identity matrix check problem HOT 1
- Bug: FBX export Video does not export correct tags HOT 1
- Bug: FBX Export does not respect materials per face
- Help: Get dimensions of embedded texture. HOT 2
- FBX Imported animation applies action to all nodes HOT 5
- MacOS compilation error: error: unknown type name 'constexpr' constexpr ai_real ai_epsilon = (ai_real) 1e-6; HOT 1
- Bug: segmentation fault while removing redundant materials HOT 4
- License missing for pyassimp HOT 3
- Bug: Issue 64108 in oss-fuzz: assimp:assimp_fuzzer: Stack-overflow in Assimp::LWS::Element::Parse
- Bug: Cant rendering on DX11 HOT 4
- FBX Feature Flag for ignore start and stop time on import
- Bug: Issue 64586 in oss-fuzz: assimp:assimp_fuzzer: Integer-overflow in Assimp::FBXExporter::WriteObjects
- Bug: assimpd export GoldSrc MDL -> OBJ possibly changes model origin? HOT 2
- Bug: FBX Exporter axes do not respect metadata HOT 1
- PostProcessing | Add post-processing step to generate texture atlasses from materials
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assimp.