MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / Close

Method Close

neo/framework/DemoFile.cpp:186–209  ·  view source on GitHub ↗

================ idDemoFile::Close ================ */

Source from the content-addressed store, hash-verified

184================
185*/
186void idDemoFile::Close() {
187 if ( writing && compressor ) {
188 compressor->FinishCompress();
189 }
190
191 if ( f ) {
192 fileSystem->CloseFile( f );
193 f = NULL;
194 }
195 if ( fLog ) {
196 fileSystem->CloseFile( fLog );
197 fLog = NULL;
198 }
199 if ( fileImage ) {
200 Mem_Free( fileImage );
201 fileImage = NULL;
202 }
203 if ( compressor ) {
204 delete compressor;
205 compressor = NULL;
206 }
207
208 demoStrings.DeleteContents( true );
209}
210
211/*
212================

Callers

nothing calls this directly

Calls 4

Mem_FreeFunction · 0.85
FinishCompressMethod · 0.80
CloseFileMethod · 0.80
DeleteContentsMethod · 0.45

Tested by

no test coverage detected