Skip to content

Commit 1a9c81e

Browse files
authored
Merge pull request #10740 from DevPoodle/compute-shader
Add reminder to free RID's in compute shader tutorial
2 parents 93963ab + 53d814e commit 1a9c81e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tutorials/shaders/compute_shaders.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,16 @@ the data and print the results to our console.
366366
GD.Print("Input: ", string.Join(", ", input));
367367
GD.Print("Output: ", string.Join(", ", output));
368368

369+
Freeing memory
370+
------------------
371+
372+
The ``buffer``, ``pipeline``, and ``uniform_set`` variables we've been using are
373+
each an :ref:`class_RID`. Because RenderingDevice is meant to be a lower-level
374+
API, RIDs aren't freed automatically. This means that once you're done using
375+
``buffer`` or any other RID, you are responsible for freeing its memory
376+
manually using the RenderingDevice's
377+
:ref:`free_rid()<class_RenderingDevice_method_free_rid>` method.
378+
369379
With that, you have everything you need to get started working with compute
370380
shaders.
371381

0 commit comments

Comments
 (0)