C++ VBox: make the destructor delete the content in C++

This commit is contained in:
Olivier Goffart 2022-05-27 13:03:55 +02:00 committed by Olivier Goffart
parent 91acbeed92
commit 48f818df62
3 changed files with 21 additions and 16 deletions

View file

@ -492,8 +492,7 @@ inline Value::Value(const std::shared_ptr<slint::Model<Value>> &model)
};
static const ModelAdaptorVTable vt { row_count, row_data, set_row_data, get_notify, drop };
vtable::VBox<ModelAdaptorVTable> wrap { &vt, wrapper.get() };
cbindgen_private::slint_interpreter_value_new_model(wrap, &inner);
cbindgen_private::slint_interpreter_value_new_model(reinterpret_cast<uint8_t *>(wrapper.get()), &vt, &inner);
}
inline Struct::Struct(std::initializer_list<std::pair<std::string_view, Value>> args)