sqlite-vss.cpp and sqlite-vector.cpp have many memory leaks that need to be cleaned up. There are a few reasons why:
SQLite's extension API handles memory and lifetime of certain items in an odd way
Faiss handles memory of indicies/query vectors in an odd way
sqlite-vector and sqlite-vss need to share a few functions/pointers that make it difficult to debug
I'm not a C++ developer so I yolo'ed a bunch
This issue will track different memory problems to solve and how to test against them.
[ ] Tests for memory leaks. I've done this before manually with Valgrind which is painful, but if anyone has suggestions to automated memory leak tests for C++ applications I'd love to hear about it!
[ ] code quality:
[ ] unique_pointer
[ ] use stack where possible
[ ]
[ ] Ensure vss_search queries don't leak memory.
[ ] Ensure all other vss0 queries don't leak
[ ] Ensure INSERT and DELETE operations by themselves don't leak
[ ] Ensure COMMIT operations don't leak
[ ] Cleanup and document the lifetime of different objects in the sqlite-vector <-> sqlite-vss APIs
sqlite-vss.cpp
andsqlite-vector.cpp
have many memory leaks that need to be cleaned up. There are a few reasons why:sqlite-vector
andsqlite-vss
need to share a few functions/pointers that make it difficult to debugThis issue will track different memory problems to solve and how to test against them.
vss_search
queries don't leak memory.sqlite-vector
<->sqlite-vss
APIs