C28624
avviso C28624: Nessuna chiamata a Release() per trovare la corrispondenza con refcount incrementato da LResultFromObject
LresultFromObject aumenta il conteggio dei riferimenti per i nuovi oggetti IAccessible.
Esempio di
Nell'esempio di codice seguente viene generato questo avviso.
{
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 );
}
Nell'esempio seguente viene evitato l'errore.
{
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();
}