From 1e8c12c2a30246d5b3bd5de2043de12904c976cb Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 21 Jun 2021 21:41:56 +0200 Subject: [PATCH] Comment out tracy imports. --- core/compress/common.odin | 4 +--- core/compress/zlib/zlib.odin | 2 +- core/image/png/helpers.odin | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/compress/common.odin b/core/compress/common.odin index 5a5b9edc6..faac67f18 100644 --- a/core/compress/common.odin +++ b/core/compress/common.odin @@ -11,9 +11,7 @@ package compress import "core:io" import "core:image" -when #config(TRACY_ENABLE, false) { - import tracy "shared:odin-tracy" -} +// when #config(TRACY_ENABLE, false) { import tracy "shared:odin-tracy" } Error :: union { General_Error, diff --git a/core/compress/zlib/zlib.odin b/core/compress/zlib/zlib.odin index 956ddaca1..d973b271c 100644 --- a/core/compress/zlib/zlib.odin +++ b/core/compress/zlib/zlib.odin @@ -16,7 +16,7 @@ import "core:io" import "core:bytes" import "core:hash" -when #config(TRACY_ENABLE, false) { import tracy "shared:odin-tracy" } +// when #config(TRACY_ENABLE, false) { import tracy "shared:odin-tracy" } /* zlib.inflate decompresses a ZLIB stream passed in as a []u8 or io.Stream. diff --git a/core/image/png/helpers.odin b/core/image/png/helpers.odin index b28e4aead..4c72643c2 100644 --- a/core/image/png/helpers.odin +++ b/core/image/png/helpers.odin @@ -34,6 +34,10 @@ destroy :: proc(img: ^Image) { } bytes.buffer_destroy(&img.pixels); + if img.metadata_ptr != nil && img.metadata_type == Info { + // Clean up Info. + free(img.metadata_ptr); + } /* We don't need to do anything for the individual chunks.