Outflow of memory with use lua the interpreter
Posted by: max
Date: September 23, 2005 02:44AM

int mysql_class::execute_query(wxString query)
{
int result = 1;
count_rows = 0;
count_cols = 0;
//const char* real_query;
//real_query = (const char*)malloc(length_query);
//real_query = query.c_str();
result = mysql_real_query(conn, query, (unsigned long)query.Length());
if(result == 0)
{
count_cols = mysql_field_count(conn);
if(count_cols == 0)
count_rows = mysql_affected_rows(conn);
else
{
res = mysql_store_result(conn);
use_result = true;
count_rows = mysql_num_rows(res);
count_cols = mysql_num_fields(res);
fd = mysql_fetch_fields(res);
data_row=mysql_fetch_row(res);
current_row = 0;
}
}
//free((void*)real_query);
query.Clear();
return result;
}

Work of this function from exe the program does not cause problems,
But at use built - in LUA the interpreter
It is not cleared used for query memory.
Why?
And how it to avoid?

It is beforehand grateful for the answer.
The program can be found here http://saxi.nm.ru/BaseEdit.zip

http://saxi.nm.ru



Edited 1 time(s). Last edit at 09/23/2005 02:46AM by max .

Options: ReplyQuote


Subject
Views
Written By
Posted
Outflow of memory with use lua the interpreter
1003
max
September 23, 2005 02:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.