Skip to content

Commit ed60888

Browse files
authored
Merge pull request #3 from jmont-dev/memory-leak
Delete httplib when Ollama class is destroyed.
2 parents ae55fa7 + 9716acb commit ed60888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: include/ollama.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ class Ollama
374374
}
375375

376376
Ollama(): Ollama("http://localhost:11434") {}
377-
~Ollama() {}
377+
~Ollama() { delete this->cli; }
378378

379379
// Generate a non-streaming reply as a string.
380380
ollama::response generate(const std::string& model,const std::string& prompt, const json& options=nullptr, const std::vector<std::string>& images=std::vector<std::string>())

0 commit comments

Comments
 (0)