MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / File_Uninit

Function File_Uninit

src/file.c:609–625  ·  view source on GitHub ↗

* Free all ressources loaded in memory. */

Source from the content-addressed store, hash-verified

607 * Free all ressources loaded in memory.
608 */
609void File_Uninit(void)
610{
611 if (s_currentPakFp != NULL) fclose(s_currentPakFp);
612 s_currentPakFp = NULL;
613 s_currentPakInfo = NULL;
614 while (s_files_in_root != NULL) {
615 FileInfoLinkedElem *e = s_files_in_root;
616 s_files_in_root = e->next;
617 free(e);
618 }
619
620 while (s_files_in_pak != NULL) {
621 PakFileInfoLinkedElem *e = s_files_in_pak;
622 s_files_in_pak = e->next;
623 free(e);
624 }
625}
626
627/**
628 * Check if a file exists either in a PAK or on the disk.

Callers 1

PrepareEndFunction · 0.85

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected