jt2594838 commented on code in PR #388: URL: https://github.com/apache/tsfile/pull/388#discussion_r1976785857
########## cpp/src/cwrapper/tsfile_cwrapper.cc: ########## @@ -80,8 +80,10 @@ TsFileWriter tsfile_writer_new(WriteFile file, TableSchema *schema, storage::TableSchema *table_schema = new storage::TableSchema(schema->table_name, column_schemas); *err_code = common::E_OK; - return new storage::TsFileTableWriter( + auto table_writer = new storage::TsFileTableWriter( static_cast<storage::WriteFile *>(file), table_schema); + delete table_schema; + return table_writer; Review Comment: Why is table_schema deleted? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@tsfile.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org