Skip to content

Commit

Permalink
Add calls in ImageInput/Output to clear error string, but leave the I…
Browse files Browse the repository at this point in the history
…mageCache and TextureSystem alone as they are less likely to accumulate cruft and also to avoid the static destruction order fiasco

Signed-off-by: Chris Kulla <[email protected]>
  • Loading branch information
fpsunflower committed Apr 14, 2024
1 parent fd2db6e commit ac5752c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/libOpenImageIO/imageinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ ImageInput::ImageInput()



ImageInput::~ImageInput() {}
ImageInput::~ImageInput()
{
// Erase any leftover errors from this thread
// TODO: can we clear other threads' errors?
input_error_messages.erase(this);
}



Expand Down
7 changes: 6 additions & 1 deletion src/libOpenImageIO/imageoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ ImageOutput::ImageOutput()



ImageOutput::~ImageOutput() {}
ImageOutput::~ImageOutput()
{
// Erase any leftover errors from this thread
// TODO: can we clear other threads' errors?
output_error_messages.erase(this);
}



Expand Down

0 comments on commit ac5752c

Please sign in to comment.