Skip to content

Add missing RID cleanup in server examples#11750

Open
Calfur wants to merge 2 commits intogodotengine:masterfrom
Calfur:using-servers-example-add-rid-cleanup
Open

Add missing RID cleanup in server examples#11750
Calfur wants to merge 2 commits intogodotengine:masterfrom
Calfur:using-servers-example-add-rid-cleanup

Conversation

@Calfur
Copy link

@Calfur Calfur commented Feb 12, 2026

  • Adds cleanup of manually created RIDs in GDScript.
  • Adds cleanup of manually created Rids in C#.

Why

As memory management does not occur automatically when using RenderingServer directly, it is recommended to implement manual cleanup.

I think it makes sense to do so in the example in the docs as well, as this is not shown on the page yet.

- Adds cleanup of manually created `RID`s in GDScript (`_exit_tree()`).
- Adds cleanup of manually created `Rid`s in C# (`_ExitTree()`).

## Why
As memory management does not occur automatically when using RenderingServer directly, it is recommended to implement manual cleanup.

I think it makes sense to do so in the example in the docs as well, as this is not shown on the page yet.
@Calinou Calinou added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.6 labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.6 enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants