diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-02-17 15:56:36 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-02-17 15:56:36 +0100 |
commit | aa325035704f932e29217274aeab26ae46847a7b (patch) | |
tree | 405e7e0a8017f55048c3607b4455d70e591a7d41 /cuda/3d/mem3d.cu | |
parent | 8de844c3521d9ee54087927923b932e1016c5b90 (diff) | |
download | astra-aa325035704f932e29217274aeab26ae46847a7b.tar.gz astra-aa325035704f932e29217274aeab26ae46847a7b.tar.bz2 astra-aa325035704f932e29217274aeab26ae46847a7b.tar.xz astra-aa325035704f932e29217274aeab26ae46847a7b.zip |
Fix cuda3d geometry memory leaks
Diffstat (limited to 'cuda/3d/mem3d.cu')
-rw-r--r-- | cuda/3d/mem3d.cu | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cuda/3d/mem3d.cu b/cuda/3d/mem3d.cu index 97be8a4..ed779fa 100644 --- a/cuda/3d/mem3d.cu +++ b/cuda/3d/mem3d.cu @@ -253,6 +253,9 @@ bool FP(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, con } } + delete[] pParProjs; + delete[] pConeProjs; + return ok; } @@ -283,6 +286,9 @@ bool BP(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, con else ok &= ConeBP(volData.d->ptr, projData.d->ptr, dims, pConeProjs, params); + delete[] pParProjs; + delete[] pConeProjs; + return ok; } @@ -303,11 +309,17 @@ bool FDK(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, co pParProjs, pConeProjs, params); - if (!ok || !pConeProjs) + if (!ok || !pConeProjs) { + delete[] pParProjs; + delete[] pConeProjs; return false; + } ok &= FDK(volData.d->ptr, projData.d->ptr, pConeProjs, dims, params, bShortScan, pfFilter); + delete[] pParProjs; + delete[] pConeProjs; + return ok; |