Update ggml/src/gguf.cpp : Defined virtual keyword for destructor of gguf_writer_base (#25867)

Without a virtual destructor, deleting a derived object through a
base-class pointer only invokes the base destructor, skipping the
derived one.
This commit is contained in:
Yongmin Yoo 유용민
2026-07-25 14:32:37 +02:00
committed by GitHub
parent 910196f6b3
commit fb92d8f187
+1 -1
View File
@@ -1424,7 +1424,7 @@ void gguf_set_tensor_data(struct gguf_context * ctx, const char * name, const vo
struct gguf_writer_base {
size_t written_bytes {0u};
~gguf_writer_base(void) = default;
virtual ~gguf_writer_base(void) = default;
// we bet on devirtualization
virtual void write(int8_t val) = 0;