We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The notes in image-c++.h indicate that, with this function, shallow data is not deleted upon image destruction.
shallow data is not deleted upon image destruction
It's a natural assumption that this would include reuse of the image object.
image
(SHA 6250cce)
The text was updated successfully, but these errors were encountered:
(suggested fix)
--- a/src/bindings/c++/image-c++.cpp +++ b/src/bindings/c++/image-c++.cpp @@ -303,7 +303,8 @@ image& image::with_shallow_pixels(void *pixels) image& image::with_shallow_pixels(void *pixels, unsigned pixels_size) { - sail_free(d->pixels); + if(!d->shallow_pixels) + sail_free(d->pixels); d->pixels = nullptr; d->pixels_size = 0;
Sorry, something went wrong.
Thanks for the report! I'll look into it.
BINDINGS/C++: [closes #51] Fix assigning shallow pixels
d7e0e25
85339a7
HappySeaFox
No branches or pull requests
The notes in image-c++.h indicate that, with this function,
shallow data is not deleted upon image destruction
.It's a natural assumption that this would include reuse of the
image
object.(SHA 6250cce)
The text was updated successfully, but these errors were encountered: