Thank you.

On Sun, Nov 18, 2012 at 8:18 PM, Yuriy Kaminskiy <yum...@gmail.com> wrote:

> Durga D wrote:
> >    What happens if sqlite3_close() called multiple times but
> > sqlite3_open_v2() called only once.
> >
> >     Practically I dint see any malfunction/corruption here. I would like
> to
> > know the behavior of sqlite in this scenario.
>
> About same as
>
>   char *foo = malloc(10);
>   free(foo);
>   free(foo);
>
> or
>
>    FILE *f = fopen("file", "r");
>    fclose(f);
>    fclose(f);
>
> Sometimes it does nothing, but display error message (e.g. with some "debug
> malloc" modes/libraries). Sometimes second sqlite3_close/free/fclose kills
> your
> program on assertion or sigsegv. Sometimes it corrupts heap internal
> structures,
> and your program may die *at random time* after that.
>
> _______________________________________________
> 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