Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

fix memory leak.

Harpreet Sangar44668ebe27ce
diff --git a/src/collection.cpp b/src/collection.cpp
index 3766a94d..5f3041a6 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -3938,6 +3938,8 @@ Option<bool> Collection::prune_doc(nlohmann::json& doc,
reference_docs.push_back(ref_doc);
}
+ delete[] documents[0].second;
+
for (const auto &ref_doc: reference_docs) {
doc.update(ref_doc);
}