AssetManager load and unload

I have a problem when use AssetManager LoadPrimaryAssets function
The api explain:" These assets will stay in memory until explicitly unloaded. "

I call LoadPrimaryAsset in beginplay and call UnloadPrimaryAsset in tick function after a few seconds.
Then another actor still can get the asset by call GetPrimaryAssetData
When the Asset can real unload?

TestProject: TestProject

Another surprising thing is that assets loaded during a game stays for the next session. I’m adding new assets between closing game and launching another session - new assets don’t get loaded…

Did you manage to get it working?

I’m loading assets via a pak file at runtime using FStreamableManager. These assets are not within the project anymore, so no hard references exist. Streaming them in async and placing them in the world. I’m now trying to unload the stuff, free the memory. But clearing the scene, unloading, unmounting, making sure all references in arrays are removed does not work. I can’t find them anymore via the AssetRegistry, so I would assume everything is ok.

But the assets are still in memory. This is especially noticeable when remounting the pak file and loading the same assets again. On the first async load of the assets I get updates from the async load. A delay of about 10frames. After remounting and loading the assets again, they are there instantly, no frame delay, no async update.