浏览代码

20211220, car_license utf8 -> GBK

huli 3 年之前
父节点
当前提交
7f31ac4555
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      tool/string_convert.cpp

+ 8 - 0
tool/string_convert.cpp

@@ -98,6 +98,10 @@ std::string String_convert::gbk_to_utf8(std::string src_str)
 	{
 		strTemp = dst_str;
 	}
+	if ( dst_str )
+	{
+		delete(dst_str);
+	}
 	return strTemp;
 }
 std::string String_convert::utf8_to_gbk(std::string src_str)
@@ -110,6 +114,10 @@ std::string String_convert::utf8_to_gbk(std::string src_str)
 	{
 		strTemp = dst_str;
 	}
+	if ( dst_str )
+	{
+		delete(dst_str);
+	}
 	return strTemp;
 }