diff options
Diffstat (limited to 'matlab/mex')
-rw-r--r-- | matlab/mex/astra_mex_data3d_c.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/matlab/mex/astra_mex_data3d_c.cpp b/matlab/mex/astra_mex_data3d_c.cpp index 8492695..8b6fb95 100644 --- a/matlab/mex/astra_mex_data3d_c.cpp +++ b/matlab/mex/astra_mex_data3d_c.cpp @@ -163,6 +163,7 @@ void astra_mex_data3d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra // Initialize data object pDataObject3D = new CFloat32ProjectionData3DMemory(pGeometry); + delete pGeometry; } else if (sDataType == "-sinocone") { @@ -396,8 +397,7 @@ void astra_mex_data3d_link(int& nlhs, mxArray* plhs[], int& nrhs, const mxArray* // Initialize data object pDataObject3D = new CFloat32VolumeData3DMemory(pGeometry, pHandle); - - //delete pGeometry; // ?? + delete pGeometry; } else if (sDataType == "-sino" || sDataType == "-proj3d" || sDataType == "-sinocone") { @@ -460,6 +460,7 @@ void astra_mex_data3d_link(int& nlhs, mxArray* plhs[], int& nrhs, const mxArray* // Initialize data object pDataObject3D = new CFloat32ProjectionData3DMemory(pGeometry, pHandle); + delete pGeometry; } else { mexErrMsgTxt("Invalid datatype. Please specify '-vol' or '-proj3d'. \n"); |