Giter Club home page Giter Club logo

Comments (7)

jrouwe avatar jrouwe commented on May 12, 2024 2

Merged #183.

from joltphysics.

jankrassnigg avatar jankrassnigg commented on May 12, 2024

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.

jrouwe avatar jrouwe commented on May 12, 2024

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.

urosidoki avatar urosidoki commented on May 12, 2024

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.

jrouwe avatar jrouwe commented on May 12, 2024

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.

jrouwe avatar jrouwe commented on May 12, 2024

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.

sherief avatar sherief commented on May 12, 2024

YAY!

from joltphysics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.