# Why are Asset not GCed(RF\_StandAlone) by default in Editor 

**URL:** <https://forums.unrealengine.com/t/why-are-asset-not-gced-rf-standalone-by-default-in-editor/2641658>\
**Category:** Programming & Scripting\
**Tags:** memory-management, unreal-engine, editor, question\
**Created:** [August 14, 2025, 1:33pm UTC](https://forums.unrealengine.com/t/why-are-asset-not-gced-rf-standalone-by-default-in-editor/2641658 "2025-08-14T13:33:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![weizhi.deng](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@weizhi.deng](https://forums.unrealengine.com/u/weizhi.deng)\
**Post date:** [August 14, 2025, 1:33pm UTC](https://forums.unrealengine.com/t/why-are-asset-not-gced-rf-standalone-by-default-in-editor/2641658/1 "2025-08-14T13:33:04Z")

</div>

While investigating memory issues, I find that Unreal will not automatically unload/destroy “unused” Assets(like StaticMesh). I found such behaviours in these 2 cases:

1. double clicking a static mesh asset in content browser, then close the mesh editor, “obj gc” several times
2. double click and open a Level, after it’s loaded, double click another Level that is empty

I confirmed StaticMesh not unloaded/destroyed by using obj list and obj refs, for those objects that I think should be cleaned up, it(obj refs) says

LogReferenceChain: (standalone) FoliageType\_InstancedStaticMesh /Game/Scene/External/BlackAlder/Foliage/SimpleWind/FT\_BlackAlder\_Field\_03.FT\_BlackAlder\_Field\_03 is not currently reachable but it does have some of GARBAGE\_COLLECTION\_KEEPFLAGS set.

Browsing through code, I find that CollectGarbages() is usually called in editor with GARBAGE\_COLLECTION\_KEEPFLAGS which in Editor is RF\_Standalone.

So here’s my question: Why is this the default behaviour? Doesn’t that means Assets would be kept alive and the memory will keeps growing? Are there any console commands that would allow a call to CollectGarbages(RF\_NoFlags)?

---

<div class="post-metadata">

**Author:** ![Liu.Wei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Liu.Wei](https://forums.unrealengine.com/u/Liu.Wei)\
**Post date:** [August 25, 2025, 9:57am UTC](https://forums.unrealengine.com/t/why-are-asset-not-gced-rf-standalone-by-default-in-editor/2641658/2 "2025-08-25T09:57:10Z")

</div>

Hi，

It’s intentional, since we don’t want to load the static mesh multiple times while using editor. We uses the Standalone flag to keep the static meshes not being GCed in editor.

I didn’t find a place to remove the RF\_Standalone flag for static meshes in the source code, and it seems there is no place to call CollectGarbage without GARBAGE\_COLLECTION\_KEEPFLAGS.
