Skip to content

Commit

Permalink
memory leak improvements - delete at end of scope
Browse files Browse the repository at this point in the history
  • Loading branch information
wsfulton committed Jun 25, 2016
1 parent 6234ebd commit 7ec7cc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Modules/scilab.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ class SCILAB:public Language {
Append(getFunctionWrapper->code, "return SWIG_OK;\n");
Append(getFunctionWrapper->code, "}\n");
Wrapper_print(getFunctionWrapper, wrappersSection);
DelWrapper(getFunctionWrapper);

/* Add function to builder table */
addFunctionToScilab(scilabGetFunctionName, getFunctionName);
Expand Down Expand Up @@ -632,11 +631,13 @@ class SCILAB:public Language {
Append(setFunctionWrapper->code, "return SWIG_OK;\n");
Append(setFunctionWrapper->code, "}\n");
Wrapper_print(setFunctionWrapper, wrappersSection);
DelWrapper(setFunctionWrapper);

/* Add function to builder table */
addFunctionToScilab(scilabSetFunctionName, setFunctionName);

DelWrapper(setFunctionWrapper);
}
DelWrapper(getFunctionWrapper);

return SWIG_OK;
}
Expand Down

0 comments on commit 7ec7cc6

Please sign in to comment.