Skip to content
New issue

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

Image texture dtor should call STBI_FREE(data) #742

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Change Log -- Ray Tracing in One Weekend
- Change: Refactored dielectric class for clarity
- Fix: Update local Markdeep library (for offline reading) to v1.11. The prior version had
incorrect content (#712)
- Fix: Image texture destructor should call `STBI_FREE` instead of delete (#734)

### _In One Weekend_
- Delete: Remove premature `cstdlib` include; not needed until we use `rand()` (#687)
Expand Down
2 changes: 1 addition & 1 deletion src/common/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class image_texture : public texture {
}

~image_texture() {
delete data;
STBI_FREE(data);
}

virtual color value(double u, double v, const vec3& p) const override {
Expand Down