From 41ff94791abfebaf8cf2c346b4aefb4895248bf3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 4 Dec 2019 15:32:33 +0100 Subject: Remove obsolete and presumably unfinished implementation of grid catalog functionality --- src/malloc.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/malloc.cpp') diff --git a/src/malloc.cpp b/src/malloc.cpp index 393437e3..d2e2d87a 100644 --- a/src/malloc.cpp +++ b/src/malloc.cpp @@ -228,7 +228,6 @@ PJ *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ /* free grid lists */ pj_dealloc( P->gridlist ); pj_dealloc( P->vgridlist_geoid ); - pj_dealloc( P->catalog_name ); /* We used to call pj_dalloc( P->catalog ), but this will leak */ /* memory. The safe way to clear catalog and grid is to call */ -- cgit v1.2.3 From 126384854bf8e1b7461aebcc28966a6559971de1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 4 Dec 2019 18:56:15 +0100 Subject: vertical grid shift: rework to no longer load whole grid into memory --- src/malloc.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/malloc.cpp') diff --git a/src/malloc.cpp b/src/malloc.cpp index d2e2d87a..050721e6 100644 --- a/src/malloc.cpp +++ b/src/malloc.cpp @@ -227,7 +227,6 @@ PJ *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ /* free grid lists */ pj_dealloc( P->gridlist ); - pj_dealloc( P->vgridlist_geoid ); /* We used to call pj_dalloc( P->catalog ), but this will leak */ /* memory. The safe way to clear catalog and grid is to call */ -- cgit v1.2.3 From 6875ef7116b9dab4021afeb06e2b79cd5679743b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 5 Dec 2019 01:03:46 +0100 Subject: horizontal grid shift: rework to no longer load whole grid into memory --- src/malloc.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/malloc.cpp') diff --git a/src/malloc.cpp b/src/malloc.cpp index 050721e6..b5fe76fc 100644 --- a/src/malloc.cpp +++ b/src/malloc.cpp @@ -225,9 +225,6 @@ 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 ); - /* We used to call pj_dalloc( P->catalog ), but this will leak */ /* memory. The safe way to clear catalog and grid is to call */ /* pj_gc_unloadall(pj_get_default_ctx()); and pj_deallocate_grids(); */ -- cgit v1.2.3 From 916a92062ffa2f2b59007047fae2176bbb463ca3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 6 Dec 2019 14:07:27 +0100 Subject: Remove hgrids and vgrids member from PJ structure, and store them in hgridshift/vgridshift/deformation structures --- src/malloc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/malloc.cpp') diff --git a/src/malloc.cpp b/src/malloc.cpp index b5fe76fc..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,6 +228,9 @@ PJ *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ pj_dealloc(P->def_spherification); pj_dealloc(P->def_ellps); + delete static_cast(P->hgrids_legacy); + delete static_cast(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 */ /* pj_gc_unloadall(pj_get_default_ctx()); and pj_deallocate_grids(); */ -- cgit v1.2.3