create OFstream on stack instead of heap

This commit is contained in:
danielque
2017-08-23 17:35:08 +02:00
parent e1116e471b
commit dd2e21be64

View File

@ -88,8 +88,7 @@ fileName IOModel::buildFilePath(word dirName) const
path=fileName("."/dirName);
mkDir(path,0777);
mkDir(fileName(path/"constant"),0777);
OFstream* stubFile = new OFstream(fileName(path/"particles.foam"));
delete stubFile;
OFstream stubFile(path/"particles.foam");
}
return path;
}