use clip_image_u8_free

This commit is contained in:
caitianchi 2025-01-21 17:08:45 +08:00
parent fee2aa687a
commit 27f5e8a10a

View file

@ -2049,7 +2049,7 @@ static std::vector<std::vector<clip_image_u8 *>> uhd_slice_image(const clip_imag
images[images.size()-1].push_back(patch); images[images.size()-1].push_back(patch);
} }
} }
delete refine_image; clip_image_u8_free(refine_image);
} }
return images; return images;
} }
@ -2091,7 +2091,7 @@ bool clip_image_preprocess(struct clip_ctx * ctx, const clip_image_u8 * img, cli
for (size_t i = 0; i < imgs.size(); ++i) { for (size_t i = 0; i < imgs.size(); ++i) {
for (size_t j = 0; j < imgs[i].size(); ++j) { for (size_t j = 0; j < imgs[i].size(); ++j) {
if (imgs[i][j] != nullptr) { if (imgs[i][j] != nullptr) {
delete imgs[i][j]; clip_image_u8_free(imgs[i][j]);
} }
} }
} }