On 1/28/19, Jim Borden <[email protected]> wrote: > I see. That complicates things a bit. What happens to SQLite temp files > when they are "done being used" (if such a concept exists). Are they > deleted or simply left there for the OS to clean up?
SQLite calls unlink() immediately after open(). So the OS deallocates the file automatically when it closes. The O_EXCL, O_CREAT, and O_NOFOLLOW flags are set on open(). The filename includes 64-bits of randomness. Windows is similar except the file is opened with the FILE_FLAG_DELETE_ON_CLOSE flag because you cannot unlink() an open file on Windows. -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

