[M3] GPUDevice leak on the cancelled-before-init path #24
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
indigocode/igasset-viewer-react#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
File:
packages/viewer-react/src/IgviewerContext.tsx(IgviewerSession)If the effect is torn down before
acquireIgviewerModuleresolves:extraCleanuparray and reassignsextraCleanup = [].cancelled, pushes the device-destroyingcleanuponto the new array, and returns early (line 209).Impact: an internally-created
GPUDevice(when nodeviceprop was supplied) is never.destroy()-ed on a fast mount/unmount — a GPU resource leak.Fix: run the captured cleanup callbacks in the cancelled branch too (destroy the device before the early return).
Filed by an automated AI code review (manual proof-of-concept run). Code locations reference the
various-cleanupbranch.