Commit 3873695b authored by Bill Hoffman's avatar Bill Hoffman
Browse files

Freeze is not portable, but the real problem was most likely a delete instead...

Freeze is not portable, but the real problem was most likely a delete instead of a delete [] because a string is allocated with new [] and must be matched with a delete []
parent 4eee352f
......@@ -672,7 +672,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
fprintf(fp," op->Print(buf);\n");
fprintf(fp," buf.put('\\0');\n");
fprintf(fp," Tcl_SetResult(interp,buf.str(),TCL_VOLATILE);\n");
fprintf(fp," buf.freeze(0);\n");
fprintf(fp," delete [] buf.str();\n");
fprintf(fp," return TCL_OK;\n }\n");
/* Add the PrintRevisions method to vtkObjectBase. */
fprintf(fp," if ((!strcmp(\"PrintRevisions\",argv[1]))&&(argc == 2))\n {\n");
......@@ -680,7 +680,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
fprintf(fp," op->PrintRevisions(buf);\n");
fprintf(fp," buf.put('\\0');\n");
fprintf(fp," Tcl_SetResult(interp,buf.str(),TCL_VOLATILE);\n");
fprintf(fp," buf.freeze(0);\n");
fprintf(fp," delete [] buf.str();\n");
fprintf(fp," return TCL_OK;\n }\n");
}
/* Add the AddObserver method to vtkObject. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment