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 Sangard2bc921f1d65
diff --git a/src/collection.cpp b/src/collection.cpp
index 6c61a24c..1026bb54 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -3999,6 +3999,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);
}