Skip to content
Snippets Groups Projects
Commit cc4d1c8c authored by Houtan Bastani's avatar Houtan Bastani
Browse files

dmm: free allocated memory

parent d89f1424
Branches
No related tags found
No related merge requests found
...@@ -44,4 +44,10 @@ void designInternal(int ny, int nz, int nx, int nu, int ns[6], int nt, ...@@ -44,4 +44,10 @@ void designInternal(int ny, int nz, int nx, int nu, int ns[6], int nt,
memcpy(a, mxGetPr(lhs[3]), sizeof(double) * mxGetNumberOfElements(lhs[3])); memcpy(a, mxGetPr(lhs[3]), sizeof(double) * mxGetNumberOfElements(lhs[3]));
memcpy(F, mxGetPr(lhs[4]), sizeof(double) * mxGetNumberOfElements(lhs[4])); memcpy(F, mxGetPr(lhs[4]), sizeof(double) * mxGetNumberOfElements(lhs[4]));
memcpy(R, mxGetPr(lhs[5]), sizeof(double) * mxGetNumberOfElements(lhs[5])); memcpy(R, mxGetPr(lhs[5]), sizeof(double) * mxGetNumberOfElements(lhs[5]));
for (int i=0; i<6; i++)
{
mxDestroyArray(lhs[i]);
mxDestroyArray(rhs[i]);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment