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

Manage time singleton in register_core_types #87635

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

rune-scape
Copy link
Contributor

the time singleton is used rlly early on, and Time::get_singleton() was always called before it was initialized, creating a memory leak when it memnewed, then ObjectDB caught the stray instance
this registers it in a more specific place right after StringName and ObjectDB are initialized,

@rune-scape rune-scape requested a review from a team as a code owner January 26, 2024 22:52
@Calinou Calinou added this to the 4.3 milestone Jan 26, 2024
Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, we want to unify where this is created and have it be as early as possible.

core/register_core_types.cpp Outdated Show resolved Hide resolved
Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it runs it should be good.

@akien-mga akien-mga merged commit 6214355 into godotengine:master Feb 12, 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
Development

Successfully merging this pull request may close these issues.

4 participants