Skip to content

Why does removing one preview tile also break another tile that uses the same photo?

Two tiles can refer to the same object URL. If one tile releases that URL while the other still needs it, the other can fail when it reloads or decodes the photo again.

NATIVE SOUNDTRACK AND MEDIA FINISHINGAISwapLab team · Editorial methodPublished 2 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file

Find what the tiles actually share

Inspect a local test with an authorized image and distinguish the underlying file from the URL string. Two calls to create an object URL from the same file return separate addresses.

Give each active view a clear lifetime

A simple approach is to retain one URL per tile and release it once the tile no longer uses it. If the renderer intentionally shares one URL, release it only after the final consumer is gone. Do not revoke it as soon as the first image loads.

Confirm the behavior

Remove the first tile, then zoom or reopen the second and verify that it can load the same image. Repeat with a new photo replacing only one tile.

Pass condition

Unmounting or changing one tile neither invalidates another active preview nor leaves unused object URLs accumulating.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example