Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaking memory on sleeping bodies #227

Open
grimaldini opened this issue Jul 6, 2022 · 0 comments
Open

Leaking memory on sleeping bodies #227

grimaldini opened this issue Jul 6, 2022 · 0 comments

Comments

@grimaldini
Copy link

I've been working on Xcode and it has detected that this might still be happening. I see several instances of leaking memory originating at https://github.com/slembcke/Chipmunk2D/blame/edf83e5603c5a0a104996bd816fca6d3facedd6a/src/cpSpaceComponent.c#L101. They seem to be happening when a body comes to rest and sleep time threshold has been set with cpSpaceSetSleepTimeThreshold(space, 1.0f). Then I deallocate the world "reset" (deallocate then recreate the space + bodies) the setup after the body has fallen asleep and wait for them to sleep again, I repeat this until I have enough memory leaks.

I am also attaching a screenshot with the malloc backtrace for the allocation in case it helps.
Screen Shot 2022-07-01 at 3 17 58 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant