aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-13 00:22:56 +0100
committerGitHub <noreply@github.com>2020-01-13 00:22:56 +0100
commit9d8647371d27bdbd717644f7df5514a6f2b07a00 (patch)
tree1ff8fa7fd812fea2ae53792b5488a90f6418095c /src/malloc.cpp
parentb6f0153e5aa27dc11d2c879dc4a62a0f35a122cb (diff)
parent22792cd55ba41ffadb248c246cc871612a5139c1 (diff)
downloadPROJ-9d8647371d27bdbd717644f7df5514a6f2b07a00.tar.gz
PROJ-9d8647371d27bdbd717644f7df5514a6f2b07a00.zip
Merge pull request #1777 from rouault/rfc4_impl
[RFC4_dev] Grid loading refactoring
Diffstat (limited to 'src/malloc.cpp')
-rw-r--r--src/malloc.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/malloc.cpp b/src/malloc.cpp
index 393437e3..3fd3699f 100644
--- a/src/malloc.cpp
+++ b/src/malloc.cpp
@@ -48,6 +48,9 @@
#include "proj.h"
#include "proj_internal.h"
+#include "grids.hpp"
+
+using namespace NS_PROJ;
/**********************************************************************/
void *pj_malloc(size_t size) {
@@ -225,10 +228,8 @@ PJ *pj_default_destructor (PJ *P, int errlev) { /* Destructor */
pj_dealloc(P->def_spherification);
pj_dealloc(P->def_ellps);
- /* free grid lists */
- pj_dealloc( P->gridlist );
- pj_dealloc( P->vgridlist_geoid );
- pj_dealloc( P->catalog_name );
+ delete static_cast<ListOfHGrids*>(P->hgrids_legacy);
+ delete static_cast<ListOfVGrids*>(P->vgrids_legacy);
/* We used to call pj_dalloc( P->catalog ), but this will leak */
/* memory. The safe way to clear catalog and grid is to call */