Skip to content

Cache user singleton pointers#1644

Open
Bromeon wants to merge 1 commit into
masterfrom
feature/cache-user-singletons
Open

Cache user singleton pointers#1644
Bromeon wants to merge 1 commit into
masterfrom
feature/cache-user-singletons

Conversation

@Bromeon

@Bromeon Bromeon commented Jun 23, 2026

Copy link
Copy Markdown
Member

Extend per-type singleton cache (#1636) to #[class(singleton)], which have a stable pointer for their init level's lifetime, just like engine singletons.

Small test reorganization:

  • Move singleton_caching_stable_instance -> engine_singleton_caching (singleton_test.rs)
  • Add user_singleton_caching
  • Remove redundant singleton_is_unique

Extend per-type singleton cache to `#[class(singleton)]`, which have a stable
pointer for their init level's lifetime, just like engine singletons.
@Bromeon Bromeon added c: register Register classes, functions and other symbols to GDScript performance Performance problems and optimizations labels Jun 23, 2026
@GodotRust

Copy link
Copy Markdown

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: register Register classes, functions and other symbols to GDScript performance Performance problems and optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants