提交 cea339de 编写于 作者: H haiyi.zb 提交者: Xiangdong Huang

[IOTDB-1282] fix C++ class SessionDataSet mem-leak

上级 1e88f658
......@@ -523,7 +523,7 @@ private:
std::vector<std::unique_ptr<MyStringBuffer>> valueBuffers;
std::vector<std::unique_ptr<MyStringBuffer>> bitmapBuffers;
RowRecord rowRecord;
char* currentBitmap; // used to cache the current bitmap for every column
char* currentBitmap = NULL; // used to cache the current bitmap for every column
static const int flag = 0x80; // used to do `or` operation with bitmap to judge whether the value is null
public:
......@@ -554,6 +554,13 @@ public:
this->tsQueryDataSet = queryDataSet;
}
~SessionDataSet() {
if (currentBitmap != NULL) {
delete[] currentBitmap;
currentBitmap = NULL;
}
}
int getBatchSize();
void setBatchSize(int batchSize);
std::vector<std::string> getColumnNames();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册