One way to fix this is to write a custom deaerator and pass it to the QSharedPointer
constructor as follows:
template <typename T_> void do_delete(T_ buf[]) { delete[] buf; }
And then
QSharedPointer<unsigned int> buffer(new unsigned int[siz], do_delete<unsigned int>);
I'm not sure if there is a more elegant solution (which would be nice)
source share