MCPcopy Create free account
hub / github.com/crownengine/crown / free

Function free

src/device/save_game.cpp:548–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546 }
547
548 void free(u32 save_request)
549 {
550 CE_ASSERT(s_save_game != NULL, "SaveGame not initialized!");
551 SaveGame::Request *rr = s_save_game->find_request(save_request);
552 if (rr == NULL)
553 return;
554
555 CE_ASSERT(rr->done.load(), "Cannot free pending SaveGame request");
556
557 rr->token = 0;
558 s_save_game->_allocator->deallocate(rr->data);
559 rr->data = NULL;
560 rr->size = 0;
561 rr->progress.store(0.0f);
562 rr->basename[0] = '\0';
563 rr->error.store(SaveError::SUCCESS);
564 }
565
566} // namespace save_game
567

Callers 7

crown_font_atlas_freeFunction · 0.50
deallocateMethod · 0.50
demangler_mainFunction · 0.50
convert_mesh_partFunction · 0.50
convert_mesh_partFunction · 0.50
load_apiFunction · 0.50

Calls 4

find_requestMethod · 0.80
loadMethod · 0.45
deallocateMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected