class

FMeshAssetResidency

Residency of the mesh assets a host loaded for its scene follows the entities that use them, as a World Partition cell's packages do in UE: when a sector streams out, its entities drop their references, and an asset nothing but the host's share-by-path cache still holds is released. Before this the cache kept every mesh that had ever streamed in until the next travel, so the CPU and GPU memory of a long session tended toward the whole world's unique meshes.

Module
Game
Header
#include "Streaming/MeshAssetResidency.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
std::vector<Ref<MeshAsset>>TakeUnreferencedRemoves from cache every asset nobody but its caches holds and hands them back, so the caller can drop what it bound to them before the last reference goes.

Function details

TakeUnreferenced

C++
static std::vector<Ref<MeshAsset>> TakeUnreferenced(std::vector<Ref<MeshAsset>>& cache, const std::function<bool(const MeshAsset&)>& heldByAssetManager = nullptr)

Removes from cache every asset nobody but its caches holds and hands them back, so the caller can drop what it bound to them before the last reference goes. heldByAssetManager says which assets the asset manager also caches — one more reference that is not a user; the manager's own LRU sweep frees those. Null entries are dropped too.

Generated from Streaming/MeshAssetResidency.h via game.json · Nov 5, 2026Version 1.0.0