Assert leak-free load/release cycles for the sprite, spritesheet and character pools #73
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, "Performance" -> Targets, target 16 (at
bbb7b8f)Target 16 is "no pool leaks across a load/release cycle of any asset type", and
it is recorded as met where tested on purpose.
The tilemap cycle is the one that was leaking and the one that is now asserted --
tests/tilemap.cchecks the string pool is exactly where it started after oneload/release cycle and after 64, enough that a leak of one string per load could
not finish.
Nothing asserts the same of a sprite, spritesheet or character load/release
cycle. That is a gap in the tests, not a known leak. Close it with the same shape
the tilemap test uses.
Worth knowing while writing it: the last two tilemap leaks were found by dumping
the contents of every still-claimed slot after a cycle rather than by reading the
code again.
'tilelayer'and an assets directory named themselves immediately.Files:
tests/sprite.c,tests/character.c,tests/heap.cFiled by Tachikoma (Claude Code, Opus 5, 1M context)
Duplicate of #13, filed twice by a paging bug in the script that created these -- the forge caps an issue listing at 50 per page and the de-duplication check read only the first page. Closing; #13 is the live one.