C28624
warning C28624: No call to Release() to match incremented refcount from LResultFromObject
LresultFromObject increases the refcount on new IAccessible objects.
Example
The following code example generates this warning.
{
IAccessible *pacc = CreateNewIAccessible();
LRESULT lTemp = LresultFromObject(riid, NULL, pacc );
}
{
IAccessible *pacc = NULL;
// Get new interface (from same object)
QueryInterface( & pacc );
// Lresult will internally bump up the refcount
// to hold onto the object.
LRESULT lTemp = LresultFromObject( riid, NULL, pacc );
}
The following example avoids the error.
{
IAccessible *pacc = CreateNewIAccessible();
// Lresult internally increases the refcount to
// hold onto the object.
LRESULT lTemp = LresultFromObject(riid, NULL, pacc );
// We no longer need our pacc interface, so we release it.
pacc->Release();
}
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla