From c1fb24fe1fbcdd1f26dbd81a3043faa0e3a3c275 Mon Sep 17 00:00:00 2001 From: caitianchi Date: Wed, 16 Oct 2024 17:15:22 +0800 Subject: [PATCH] Take good advice and streamline code --- examples/llava/clip.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index 6ab24459b..7ed8d8dc5 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -1969,13 +1969,10 @@ 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 j = 0; j < imgs[i].size(); ++j) { if (imgs[i][j] != nullptr) { - imgs[i][j]->buf.clear(); delete imgs[i][j]; } } - imgs[i].clear(); } - imgs.clear(); return true; }