gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

enable cleaning of internal gdl objects at exit in debug mode #1762

Closed GillesDuvert closed 6 months ago

GillesDuvert commented 6 months ago

if gdl is compiled with -DCMAKE_CXX_FLAGS='-DGDL_DO_ATEXIT=1 ...', i.e, if GDL_DO_ATEXIT is defined, then gdl will clean up all its objects before exit. This removes a tremendous list of supposed memory leaks as reported by Valgrind or Sanitizers. To be used in debug mode of course. Mostly, with the exception of a small list of internal objects that cannot be destroyed before exit (because they share memory with another, destroyed, object) the (still long) list of supposed memory leaks is dues to wxWidgets or other external libraries (probably beacause we do not correctly use their respective cleanup functions).

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 42.83%. Comparing base (e11536c) to head (463cf32).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1762 +/- ## ======================================= Coverage 42.83% 42.83% ======================================= Files 361 361 Lines 97064 97060 -4 Branches 19850 19849 -1 ======================================= - Hits 41577 41576 -1 + Misses 55487 55484 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.