diff --git a/Walnut/src/Walnut/Image.cpp b/Walnut/src/Walnut/Image.cpp index d1fc3166..c3b51b92 100644 --- a/Walnut/src/Walnut/Image.cpp +++ b/Walnut/src/Walnut/Image.cpp @@ -69,6 +69,7 @@ namespace Walnut { AllocateMemory(m_Width * m_Height * Utils::BytesPerPixel(m_Format)); SetData(data); + stbi_image_free(data); } Image::Image(uint32_t width, uint32_t height, ImageFormat format, const void* data) @@ -287,4 +288,4 @@ namespace Walnut { AllocateMemory(m_Width * m_Height * Utils::BytesPerPixel(m_Format)); } -} \ No newline at end of file +}