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

Modify allocation process of the PhysicalBoneSimulator in Skeleton3D #91122

Merged
merged 1 commit into from
May 4, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Apr 24, 2024

Fixed an issue with the allocation process with PhysicalBoneSimulator as virtual children that was occurring when Skeleton3D was added to or removed from scenes in the editor, such as ImportScene.

@TokageItLab TokageItLab added this to the 4.3 milestone Apr 24, 2024
@TokageItLab TokageItLab requested review from a team April 24, 2024 18:13
@TokageItLab TokageItLab requested a review from a team as a code owner April 24, 2024 18:13
@TokageItLab TokageItLab changed the title Modify allocation process of the PhysicalBone simulator in Skeleton3D Modify allocation process of the PhysicalBoneSimulator in Skeleton3D Apr 24, 2024
@TokageItLab TokageItLab force-pushed the simulator-memdel branch 6 times, most recently from 554975e to b6c5393 Compare April 25, 2024 15:31
@clayjohn
Copy link
Member

Won't this result in a memory leak on exit since the simulator is never freed?

@TokageItLab
Copy link
Member Author

TokageItLab commented Apr 25, 2024

As long as it is guaranteed to be add_child() immediately after allocating, I think it is guaranteed that memory will be released when removing Skeleton from the scene or when remove_child(simulator) is done (unexpectedly).

@akien-mga akien-mga merged commit 84013a3 into godotengine:master May 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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