taosMemoryFree is declared in taos.h and not exported in windows port
freemine opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
taosMemoryFree
is not declared in taos.h
for application to compile, and not exported in taosc's windows port for application to use.
and taosMemoryFree
is not trivial implemention of free
as a result, functions, such as taos_stmt_get_tag_fields
/taos_stmt_get_col_fields
, would result in memory leakage in application.
Describe your desired behavior
no memory leakage in application built upon taos.h
/taosc
Describe your solutions/suggestions if you've any
either declare and export taosMemoryFree
or add specific API in taos.h
for application to use.
Additional context
seems all versions of taos suffers
@freemine we don't need to export taosMemoryFree, you can call free to free the memory. taosMemoryFree also calls free directly.
@dapan1121 have you tried in windows port with free
directly?
@dapan1121
how should i say.
after a lot of tweeks, guess what?
following official document, taosc
is built with Debug
configuration, which finally links Debug
version of free
but the application
is build with Release
configuration, which links Release
version of free
.
when i rebuild application
in Debug
configuration, problem disappears.
this is the root cause.
frankly speaking, a specific API better be there in taos.h
publicly for application to use!