Skip to content

fix(softimage): Fix possible small allocation leak#5182

Merged
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-pic-leak
May 7, 2026
Merged

fix(softimage): Fix possible small allocation leak#5182
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-pic-leak

Conversation

@lgritz
Copy link
Copy Markdown
Collaborator

@lgritz lgritz commented May 5, 2026

We used new/delete for some small allocations, but there was a possible leak because early returns would skip the delete. But even when not leaking, this was wasteful. Replace by a stack allocation using OIIO_ALLOCA outside the loop -- both problems solved.

We used new/delete for some small allocations, but there was a
possible leak because early returns would skip the delete. But even
when not leaking, this was wasteful. Replace by a stack allocation
using OIIO_ALLOCA outside the loop -- both problems solved.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit 42b6359 into AcademySoftwareFoundation:main May 7, 2026
83 of 86 checks passed
@lgritz lgritz deleted the lg-pic-leak branch May 9, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants