Pt-br/UTIL Remove: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Using L template for links)
m (obsolete language category)
 
Line 27: Line 27:




[[Category:Programming:pt-br]]
{{ACategory|Programming}}
[[Category:UTIL:pt-br]]
{{ACategory|UTIL}}

Latest revision as of 03:40, 22 August 2024

English (en)Deutsch (de)Português do Brasil (pt-br)Translate (Translate)

UTIL_Remove é um UTIL (en) que temos no source code para remover objetos. UTIL_Remove marca um objeto para ser deletado no próximo frame e não no atual!. Removendo objetos no frame atual pode causar null pointers ,que podem travar o jogo, então o UTIL_remove é incluído para prevenir isso!

Como é usado

void UTIL_Remove( IServerNetworkable *oldObj );

Exemplo

UTIL_Remove( this );
CBaseFire *pEffect = m_hEffect;
if ( pEffect != NULL )
{
	UTIL_Remove( pEffect );
        m_hEffect = NULL;
}

Veja também