You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The modelview example with QAbstractListModel_OnData is susceptible to this - it has to return a pointer to QVariant, because that is all that can traverse the ABI, but the Qt C++ method presumes a pass by value.
Probably, any callbacks that return a type by value (and the C ABI has to project as a pass by value) will need to destruct the value.
Currently, the destructors are embedded directly in the emitgo functions (e.g. emitParameterGo2CABIForwarding does a lot of defer C.free(...)). They'll need to be split out to separate functions and called more intelligently.
This is the dual of the problem in #86. A complete solution would fix both problems.
This bug is more about miqt_array.data which miqt_exec_callback_QAbstractItemView_SelectedIndexes allocates - after the generated code has finished iterating over the items and adding them to the list, it could free data. Ditto other similar converters (miqt_string to QString etc).
miqt/qt/gen_qabstractitemview.cpp
Line 977 in 7ee9170
In this callback handler, the
miqt_array
is allocated on the go side but never freed. Ditto for other, similar conversions.The text was updated successfully, but these errors were encountered: