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

Method Shutdown

neo/framework/DeclManager.cpp:885–917  ·  view source on GitHub ↗

=================== idDeclManagerLocal::Shutdown =================== */

Source from the content-addressed store, hash-verified

883===================
884*/
885void idDeclManagerLocal::Shutdown( void ) {
886 int i, j;
887 idDeclLocal *decl;
888
889 // free decls
890 for ( i = 0; i < DECL_MAX_TYPES; i++ ) {
891 for ( j = 0; j < linearLists[i].Num(); j++ ) {
892 decl = linearLists[i][j];
893 if ( decl->self != NULL ) {
894 decl->self->FreeData();
895 delete decl->self;
896 }
897 if ( decl->textSource ) {
898 Mem_Free( decl->textSource );
899 decl->textSource = NULL;
900 }
901 delete decl;
902 }
903 linearLists[i].Clear();
904 hashTables[i].Free();
905 }
906
907 // free decl files
908 loadedFiles.DeleteContents( true );
909
910 // free the decl types and folders
911 declTypes.DeleteContents( true );
912 declFolders.DeleteContents( true );
913
914#ifdef USE_COMPRESSED_DECLS
915 ShutdownHuffman();
916#endif
917}
918
919/*
920===================

Callers

nothing calls this directly

Calls 7

Mem_FreeFunction · 0.85
ShutdownHuffmanFunction · 0.85
NumMethod · 0.45
FreeDataMethod · 0.45
ClearMethod · 0.45
FreeMethod · 0.45
DeleteContentsMethod · 0.45

Tested by

no test coverage detected