void Sprite::Close() { _Release(m_pVertexBuffer); _Release(m_pIndexBuffer); _Release(m_pConstantBuffer); _Close(m_pShader); }
/* ======================== idSnapShot::objectBuffer_t::operator= ======================== */ void idSnapShot::objectBuffer_t::operator=( const idSnapShot::objectBuffer_t& other ) { //assert( mem.IsMapHeap() ); if( this != &other ) { _Release(); data = other.data; size = other.size; _AddRef(); } }
/* ======================== idSnapShot::objectBuffer_t::Alloc ======================== */ void idSnapShot::objectBuffer_t::Alloc( int s ) { //assert( mem.IsMapHeap() ); if( !verify( s < SIZE_NOT_STALE ) ) { idLib::FatalError( "s >= SIZE_NOT_STALE" ); } _Release(); data = ( byte* )Mem_Alloc( s + 1, TAG_NETWORKING ); size = s; data[size] = 1; }
/** * @par Implementation notes: */ void W1::WriteBit(bool bit) { // These operations are time sensitive... if(bit) { ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { _DriveLow(); DELAY(A); _Release(); } DELAY(B); }else{
/** * @par Implementation notes: */ bool W1::Reset() { bool presence = false; DELAY(G); _DriveLow(); DELAY(H); // Must delay *at least* this amount ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { _Release(); DELAY(I); presence = (_ReadState() == 0); } DELAY(J); return presence; }
/** * @par Implementation notes: */ uint8_t W1::ReadBit() { bool state; // These operations are time sensitive... ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { _DriveLow(); DELAY(A); _Release(); DELAY(E); state = _ReadState(); } DELAY(F); return (uint8_t)state; }
~ SharedPtr() { _Release(); }
~ SharedArray() { _Release(); }
/** * @par Implementation notes: */ W1::~W1() { _Release(); }
CSciEdit::~CSciEdit() { _Release(); }