This commit is contained in:
The Arrayser 2022-08-29 16:41:13 +02:00 committed by GitHub
parent 3466a55c41
commit fe4260e8f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,10 +118,12 @@ void * sus_fileFileToMemroy(sus_File file){
} }
void sus_fileClose(sus_File file){ void sus_fileClose(sus_File file){
if(file->memroy == NULL){
FlushViewOfFile(file->memroy, 0); FlushViewOfFile(file->memroy, 0);
UnmapViewOfFile(file->memroy); UnmapViewOfFile(file->memroy);
CloseHandle(file->fileMapHandle); CloseHandle(file->fileMapHandle);
CloseHandle(file->fileHandle); CloseHandle(file->fileHandle);
}
sus_heapFree(file); sus_heapFree(file);
} }