浏览代码

Fixed CSV2YAML not freeing memory (#4542)

* Fixes #4541.
* CSV2YAML tool will now free the memory on each database conversion.
Thanks to @Lemongrass3110!
Aleos 5 年之前
父节点
当前提交
69b68bc2f5
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/tool/csv2yaml.cpp

+ 2 - 0
src/tool/csv2yaml.cpp

@@ -178,6 +178,8 @@ bool process( const std::string& type, uint32 version, const std::vector<std::st
 
 
 			std::ofstream out;
 			std::ofstream out;
 
 
+			body.~Emitter();
+			new (&body) YAML::Emitter();
 			out.open(to);
 			out.open(to);
 
 
 			if (!out.is_open()) {
 			if (!out.is_open()) {