mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-30 10:03:56 +01:00
evict charged snapshot k for path k-1's tiles only, but snapshot k holds every pixel after k paths and shares tile handles with the others. After an older snapshot was evicted, a newer one could retain a whole older generation (full fill, one-tile stroke, full fill, one-tile stroke) and the 256 MiB cap was exceeded. Walk newest to oldest and charge only handles not already held by the live pixels, the edited snapshot or a kept newer snapshot. Also drop the debug_assert from non-test code. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>