mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-30 04:47:09 -06:00
GpuCanvas::retain called forget_doc only for documents still in its texture map. A document whose entry had been dropped earlier (texture creation failed, a fresh render failed after uploading, or the canvas outgrew its budget after Canvas Size) kept its resident pages, effect maps and lower-stack composite after it was closed, until another document pushed the budgets over; with no other GPU document, for good. Compositor::retain_docs forgets every document the caller doesn't list as open, whatever the texture map says, and retain calls it each time. The open documents' ids, their preview ids and the adjustment proxies are already in that list, so nothing in use is dropped. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>