Skip to content

Commit

Permalink
HarfBuzz: Enable atexit to silence some CRT debug memory leak warnings
Browse files Browse the repository at this point in the history
Before this change, after running a JUCE app on Windows under a
debugger, and quitting it normally (e.g. pressing the close title
button), the output log would display some memory leak diagnostics. This
is because HarfBuzz expects to clean up statics using atexit, but atexit
was not enabled. This change enables atexit on supported platforms,
including Windows.
  • Loading branch information
reuk authored and tpoole committed Jul 29, 2024
1 parent 61a0309 commit 12ef0a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/juce_graphics/juce_graphics_Harfbuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations",
"-Wexpansion-to-defined",
"-Wunsafe-loop-optimizations")

#define HAVE_ATEXIT 1

#if JUCE_LINUX || JUCE_BSD
#ifndef JUCE_USE_FREETYPE
#define JUCE_USE_FREETYPE 1
Expand Down

0 comments on commit 12ef0a0

Please sign in to comment.