summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bltConfig.C8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bltConfig.C b/src/bltConfig.C
index c43155b..2ff82f9 100644
--- a/src/bltConfig.C
+++ b/src/bltConfig.C
@@ -148,11 +148,11 @@ static Tcl_Obj* DashesGetProc(ClientData clientData, Tk_Window tkwin,
if (!cnt)
return Tcl_NewListObj(0, (Tcl_Obj**)NULL);
- Tcl_Obj** ll = (Tcl_Obj**)calloc(cnt, sizeof(Tcl_Obj*));
+ Tcl_Obj** ll = new Tcl_Obj*[cnt];
for (int ii=0; ii<cnt; ii++)
ll[ii] = Tcl_NewIntObj(dashesPtr->values[ii]);
Tcl_Obj* listObjPtr = Tcl_NewListObj(cnt, ll);
- free(ll);
+ delete [] ll;
return listObjPtr;
};
@@ -200,11 +200,11 @@ static Tcl_Obj* ListGetProc(ClientData clientData, Tk_Window tkwin,
if (!cnt)
return Tcl_NewListObj(0, NULL);
- Tcl_Obj** ll = (Tcl_Obj**)calloc(cnt, sizeof(Tcl_Obj*));
+ Tcl_Obj** ll = new Tcl_Obj*[cnt];
for (int ii=0; ii<cnt; ii++)
ll[ii] = Tcl_NewStringObj((*listPtr)[ii], -1);
Tcl_Obj* listObjPtr = Tcl_NewListObj(cnt, ll);
- free(ll);
+ delete [] ll;
return listObjPtr;
};