On 6/29/06, Richard Boyd <[EMAIL PROTECTED]> wrote:
I now check for NULL to be sure that I'm trying to free up a pointer that
actually points to something. Is there an easy way for me to ensure that the
memory has been successfully freed up? I understand this might be a basic C
question rather t
n, so apologies for that...
Thanks again,
Richard.
-Original Message-
From: Dennis Cote [mailto:[EMAIL PROTECTED]
Sent: 28 June 2006 21:46
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] sqlite3_free_table question
Richard Boyd wrote:
> Basically I have a structure I use to hold data
Dennis Cote <[EMAIL PROTECTED]> wrote:
> Christian Smith wrote:
> > sqlite3_free, and the sqlite3GenericFree that implements it asserts
> > that the pointer passed in is not NULL. So it is not safe to pass in a
> > NULL pointer.
> >
> > It should be safe, if sqlite3_free and co are mimicking the
Christian Smith wrote:
sqlite3_free, and the sqlite3GenericFree that implements it asserts
that the pointer passed in is not NULL. So it is not safe to pass in a
NULL pointer.
It should be safe, if sqlite3_free and co are mimicking the behaviour
of the libc free. The current CVS implementatio
Dennis Cote uttered:
Your call to sqlite3_free_table is correct.
You free the error message by calling sqlite3_free(tresult.err_msg).
If either pointer returned by sqlite3_get_table() is NULL, then no memory was
allocated, so there is no need to free it, however I believe it should be
safe
Dennis,
Ok thanks for the quick response. I'll persevere with that then and get back
if I still have problems.
Thanks,
Richard.
Richard Boyd wrote:
Basically I have a structure I use to hold data results:
//=
typedef struct {
char *sqlStatement; // Either the sqlstatement to be executed or the
last statement that was executed
char **results; // the result stored in an array
char *err_m
Hi all,
Firstly, forgive me for a slightly naïve question; I dont normally code in
C and Im having problems freeing up memory.
Basically I have a structure I use to hold data results:
//=
typedef struct {
char *sqlStatement; // Either the sqlstatement to be executed or
8 matches
Mail list logo