Thanks a lot Igor for respond my email.
JP



________________________________
From: Igor Tandetnik <itandet...@mvps.org>
To: sqlite-users@sqlite.org
Sent: Sunday, May 3, 2009 7:05:52 PM
Subject: Re: [sqlite] sqlite3_finalize(sqlite3_stmt) is this call clean up 
thememory

"Joanne Pham" <joannekp...@yahoo.com>
wrote in message news:111052.72599...@web90308.mail.mud.yahoo.com
> Is sqlite3_finalize(sqlite3_stmt) cleaning up the memory which is
> allocated by sqlite_prepare()?
> I checked the database statement handle before calling
> sqlite3_finalize and after calling this sqlite3_finalize the address
> is the same.

int* p = new int;
printf("Before: %p\n", p);
delete p;
printf("After: %p\n", p);

Try this code - you'll see that it prints the same address twice. Does 
this surprise you? Would you take it as a sign that this code somehow 
fails to deallocate all the memory it allocates?

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to