Skip to content

Commit

Permalink
Add snippet about how to disable permanent slots
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Oct 7, 2024
1 parent 9f93454 commit 179987b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/godot/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ s.references_max = 100

There are a finite amount of permanent slots, controlled by you. Keep in mind that sometimes you don't know what a program does, as you didn't write it. Making storage explicit is intentional.

## Disabling permanent slots

You can disable permanent slots by setting `max_references` to 0 before initialization. After initialization you can set it back again, as it is now used for maximum temporary Variants.

## Memory safety and use-after-free

Expand Down

0 comments on commit 179987b

Please sign in to comment.