void TFile::InternalClose() { if(IsEmpty()) return; if(!IsOpen()) return; try { if(m_flOpenFlags & FOF_TEXT) { fclose(m_pFile), m_pFile = NULL; } else { CloseHandle(m_hFile), m_hFile = NULL; } if(m_bRemoveOnClose) InternalRemove(); } catch(...) { } }
void CClientTXD::RemoveAll ( void ) { std::list < unsigned short > ::iterator it; for ( it = m_ImportedModels.begin (); it != m_ImportedModels.end (); it++ ) { InternalRemove ( *it ); } m_ImportedModels.clear (); m_usMainModel = 0xFFFF; }
void TFile::Release() { try { InternalClose(); } catch(... ) {} if(!IsEmpty() && m_bRemoveOnRelease) { try { InternalRemove(); } catch(...) {} } m_bAllocated = false; }
void CDownloadWithSources::RemoveSource(CDownloadSource* pSource, BOOL bBan) { ASSUME_LOCK( Transfers.m_pSection ); InternalRemove( pSource ); if ( bBan && ! pSource->m_sURL.IsEmpty() ) AddFailedSource( pSource ); SetModified(); }
void TFile::Remove() { DEBUG_VERIFY_ALLOCATION; if(!InternalRemove()) { INITIATE_DEFINED_CODE_FAILURE( (KString)TEXT("Error deleteing file \"") + m_FilePos.m_FileName + TEXT("\""), GetLastError()); } }
void CClientTXD::Remove ( unsigned short usModelID ) { if ( IsImported ( usModelID ) ) { // Remove the model InternalRemove ( usModelID ); // Remove it from the list m_ImportedModels.remove ( usModelID ); // If we just removed ourselves from our main model, we are free again to use our main // textures in a model directly if ( usModelID == m_usMainModel ) m_usMainModel = 0xFFFF; } }