Inability to unload an object from memory

blAddddDe
Wed, 12 Mar 2025 00:08:09 +0000
C++

Good afternoon/evening/morning.

The more I learn about PDA and AssetManager, the faster I go crazy.
Today I encountered a new problem: object (Primary Data Asset ) is not unloaded from memory.
I run ForceGC and check obj list class=ItemAssetData
and I still have all the loaded PDAs, even though no one has references to them

My PDA loading function:

And how i use this:

You’d think after loading it should unload the asset, but it doesn’t.
When I use the obj refs name=PDA_Wood command to see the references, I get this message:
PDA_Wood is not currently reachable but it does have some of GARBAGE_COLLECTION_KEEPFLAGS set.

But as soon as I added the line Asset->Asset->ClearFlags(RF_Standalone) everything worked.

Please tell me what I did wrong, maybe the problem is in lambda functions or something else
PDA Base Class:

If you need any additional information, please write.

THANK YOU

UPD:

p.s: I removed the line Asset->ClearFlags(RF_Standalone), I believe it is possible without it.

4 posts - 3 participants