From 96ac0f210b6dd3fdb499115d83bc13ff7739cd60 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 26 Aug 2019 23:21:12 +0200 Subject: Add a proj_cleanup() function to free global resources, typically at process termination --- src/malloc.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/malloc.cpp') diff --git a/src/malloc.cpp b/src/malloc.cpp index 817f8f20..393437e3 100644 --- a/src/malloc.cpp +++ b/src/malloc.cpp @@ -255,3 +255,10 @@ PJ *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ delete P; return nullptr; } + +/*****************************************************************************/ +void proj_cleanup() { +/*****************************************************************************/ + pj_clear_initcache(); + pj_deallocate_grids(); +} -- cgit v1.2.3