MCPcopy Create free account
hub / github.com/defold/defold / FreeCacheCreator

Function FreeCacheCreator

engine/dlib/src/dlib/http_cache.cpp:515–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513 }
514
515 static void FreeCacheCreator(HCache cache, HCacheCreator cache_creator)
516 {
517 if (cache_creator->m_File)
518 {
519 fclose(cache_creator->m_File);
520 }
521
522 if (cache_creator->m_Filename)
523 {
524 dmSys::Unlink(cache_creator->m_Filename);
525 free(cache_creator->m_Filename);
526 }
527
528 cache->m_CacheCreatorsPool.Push(cache_creator->m_Index);
529
530 cache_creator->m_File = 0;
531 cache_creator->m_Filename = 0;
532 cache_creator->m_Index = 0xffff;
533 }
534
535 Result Add(HCache cache, HCacheCreator cache_creator, const void* content, uint32_t content_len)
536 {

Callers 1

EndFunction · 0.85

Calls 3

freeFunction · 0.85
UnlinkFunction · 0.70
PushMethod · 0.45

Tested by

no test coverage detected