Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak: clip_tokenize and clip_image_preprocess #86

Open
nemosupremo opened this issue Dec 8, 2023 · 0 comments
Open

Memory leak: clip_tokenize and clip_image_preprocess #86

nemosupremo opened this issue Dec 8, 2023 · 0 comments

Comments

@nemosupremo
Copy link

It looks like clip_tokenize and clip_image_preprocess both allocate arrays:

res->data = new float[res->size]();

https://github.com/monatis/clip.cpp/blob/8f348725271db67517de871dea4a4e8a159e664f/clip.cpp#675

however there is no way to free these arrays. I'm not sure if I'm missing something here with C++, but these methods should either provide a free or the ability to pass your own buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant