# Will UClass Object be GC?

**URL:** <https://forums.unrealengine.com/t/will-uclass-object-be-gc/2007922>\
**Category:** C++\
**Tags:** garbage-collector, uobject, Reflections, UClass, unreal-engine, CPP, question\
**Created:** [September 6, 2024, 8:35am UTC](https://forums.unrealengine.com/t/will-uclass-object-be-gc/2007922 "2024-09-06T08:35:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![user\_26c4c94f4bfc5ec2ad831c0e160b3abebd1aea0ce84dd247069373](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_26c4c94f4bfc5ec2ad831c0e160b3abebd1aea0ce84dd247069373](https://forums.unrealengine.com/u/user_26c4c94f4bfc5ec2ad831c0e160b3abebd1aea0ce84dd247069373)\
**Post date:** [September 6, 2024, 8:35am UTC](https://forums.unrealengine.com/t/will-uclass-object-be-gc/2007922/1 "2024-09-06T08:35:23Z")

</div>

I wrote a TMap\<UClass\*, int32\>. But the key could be pointing to a UClass that is defined in a dynamicly loaded module. So if that module got unloaded, will that UClass\* become a dangling pointer? Or I can expect that once a UClass\* is created in memory, it never got gc?
