memory leak fixed

This commit is contained in:
Uwe Rathmann 2023-04-20 10:26:08 +02:00
parent 4f4816bb31
commit 2d6b7b3f46

View File

@ -249,8 +249,16 @@ static void qskInvokeMetaCall(
if ( receiver.isNull() )
{
// object might have died in the meantime
free( arguments );
/*
receiver might have died in the meantime.
We create a dummy event, so that the arguments
are freed by its destructor.
*/
const MetaCallEvent cleanUpEvent(
call, metaObject->d.static_metacall,
offset, index, arguments, nullptr );
return;
}