[memory leakage] fixed a leakage by projector free
This commit is contained in:
parent
98297afbd5
commit
fc25544867
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
//
|
//
|
||||||
// Constants
|
// Constants
|
||||||
|
@ -708,6 +709,7 @@ void omni_free(struct omni_context *ctx_omni)
|
||||||
if(internal_chars != nullptr)
|
if(internal_chars != nullptr)
|
||||||
{
|
{
|
||||||
free(internal_chars);
|
free(internal_chars);
|
||||||
|
internal_chars = nullptr;
|
||||||
}
|
}
|
||||||
if (ctx_omni->ctx_whisper)
|
if (ctx_omni->ctx_whisper)
|
||||||
{
|
{
|
||||||
|
@ -716,7 +718,7 @@ void omni_free(struct omni_context *ctx_omni)
|
||||||
}
|
}
|
||||||
if (ctx_omni->projector)
|
if (ctx_omni->projector)
|
||||||
{
|
{
|
||||||
ctx_omni->projector->free();
|
delete ctx_omni->projector;
|
||||||
}
|
}
|
||||||
|
|
||||||
llama_free(ctx_omni->ctx_llama);
|
llama_free(ctx_omni->ctx_llama);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue