hlVoid CSGAFile::CSGADirectory<TSGADirectoryHeader, TSGASection, TSGAFolder, TSGAFile, TSGAFileHeader>::ReleaseStreamInternal(Streams::IStream &Stream) const { if(Stream.GetType() == HL_STREAM_MEMORY) { delete []static_cast<const hlByte *>(static_cast<Streams::CMemoryStream &>(Stream).GetBuffer()); } }
hlVoid CVBSPFile::ReleaseStreamInternal(Streams::IStream &Stream) const { if(Stream.GetType() == HL_STREAM_MEMORY) { delete [](hlByte *)static_cast<Streams::CMemoryStream &>(Stream).GetBuffer(); } }
hlVoid CVPKFile::ReleaseStreamInternal(Streams::IStream &Stream) const { if(Stream.GetType() == HL_STREAM_MEMORY) { hlByte *lpBuffer = (hlByte *)static_cast<Streams::CMemoryStream &>(Stream).GetBuffer(); const hlByte *lpView = (const hlByte *)this->pView->GetView(); if(lpBuffer < lpView || lpBuffer >= lpView + this->pView->GetLength()) { delete []lpBuffer; } } }