Thanks a lot Igor for respond my email.
JP



________________________________
From: Igor Tandetnik <[email protected]>
To: [email protected]
Sent: Sunday, May 3, 2009 7:05:52 PM
Subject: Re: [sqlite] sqlite3_finalize(sqlite3_stmt) is this call clean up 
thememory

"Joanne Pham" <[email protected]>
wrote in message news:[email protected]
> 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
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to