Comments (7)
Merged #183.
from joltphysics.
Would like to see this as well. Might mean that you'd need to get rid of using std::vector and use a custom array class.
from joltphysics.
I was planning on using the allocator class that you can provide to std::vector, maybe I'll create my own container classes at some point in the future (for now it is not really in the way as it is mostly used for long term storage).
from joltphysics.
I have a problem that might be related to this (not sure). I have my own custom allocator where I keep track of memory, but when I am shutting down the app, I got tons of memory leaks from the memory allocated during the call to JPH::RegisterTypes();
Would be nice to be able to have a certain level of control over when I do want to deallocate that memory.
from joltphysics.
Can you try #146 and call JPH::Factory::sInstance.Clear()? My guess is that your leak detection code runs before the static destructors are called. I'm not 100% sure that this will fix it as some STL implementations seem to allocate memory even if the map is empty.
from joltphysics.
I did some more work on #146 and removed most of the memory allocated by global constructors and made the application responsible for newing/destroying the factory. There are a couple of allocations left by the global constructors, most notably the SphereShape used by Body::sFixedToWorld, but I believe that that should not be an issue for your particular case.
from joltphysics.
YAY!
from joltphysics.
Related Issues (20)
- Avoid setting CMake configuration types as a subproject HOT 9
- `CylinderShape` vs `MeshShape` yields odd collision data HOT 4
- Placement new with Jolt allocators HOT 2
- GCC 13.2: warning: ISO C++ prohibits anonymous structs [-Wpedantic] HOT 2
- Some userdata variables are still uint32_t HOT 2
- Support multiple collisions per vertex for a soft body
- CharacterContactListener: add OnContactPersisted and OnContactRemoved HOT 3
- Should DecoratedShapeSettings allow for raw pointers in its constructor? HOT 3
- Epsilon values in asserts causing issues in Debug builds HOT 9
- Automatic transmission HOT 2
- Crash in SkeletonMapperTest sample HOT 3
- Use in Vision OS?
- Slightly incorrect documentation HOT 1
- Box can rotate while sliding due to friction being applied asymmetrically
- About override new object (不能通过内存的方式创建对象,对于重写了new的class) HOT 2
- Linker Failure: GetSubmergedVolume HOT 2
- DirectX Error HOT 5
- btMotionState equivalent? HOT 4
- Documentation: Syntax is not valid for JPH::ConvexHullShapeSettings HOT 2
- Weird issue with virtual character controller not hitting the ground in Firefox Emscripten HOT 5
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 joltphysics.