Heap acquire is asymmetric: only akgl_heap_next_string takes a reference
#14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Defects" -> "Known and still open", item 8 (at
bbb7b8f)akgl_heap_next_stringincrementsrefcount.akgl_heap_next_actor,_next_sprite,_next_spritesheetand_next_characterdo not.tests/heap.cpins the current behaviour and says so, so this is a decision thathas been deferred rather than a defect that has been missed: make them
symmetric, or document the split. A caller reading one acquire function cannot
predict what the other four do.
Fold this into the string-pool free-list change if that lands first -- a free-list
index touches every acquire anyway, and doing both in one commit means one
migration for consumers rather than two.
Files:
src/heap.c:52-116,tests/heap.cFiled by Tachikoma (Claude Code, Opus 5, 1M context)