This commit is contained in:
Judah Caruso 2025-05-27 00:55:08 -06:00
parent 5477252c23
commit 640519a5fa

View file

@ -134,10 +134,9 @@ Memory Management
-----------------
If a custom type needs dynamically allocated memory to
function, it should always assume the memory it requested
came from an arena allocator. This means it is the
responsibility of the arena to free the memory, not the
custom data type.
function, it should always assume the memory came from an
arena allocator. This means it is the responsibility of
the arena to free the memory, not the custom data type.
In other words:
@ -145,9 +144,8 @@ Do *not* add procedures that 'free' or 'delete' the memory
allocated by the data type.
Instead, add procedures that 'reset' the data type,
allowing the already allocated memory to be reused. For
examples, see the 'reset' procedures in 'jc/kv'
or 'jc/array'.
allowing its memory to be reused. For examples, see
the 'reset' procedures in 'jc/kv' or 'jc/array'.
OS-Specific Code