SRombauts / SQLiteCpp

SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
http://srombauts.github.io/SQLiteCpp
MIT License
2.22k stars 510 forks source link

Fix crash on Windows due to forward declarations #436

Closed trygveslangfeldt closed 1 year ago

trygveslangfeldt commented 1 year ago

In this commit, we address a bug that was causing a crash on Windows. The issue was due to the forward declaration of sqlite3 objects in the header files, which led to problems during destruction because the complete type information was unavailable at that point. To resolve this, we moved the default destructors for the Database and Statement classes from their respective headers to the implementation (.cpp) files. This ensures that the destructors have the full type information necessary for proper destruction, preventing the crash.