# Is TSubclassOf same as UClass\*

**URL:** <https://forums.unrealengine.com/t/is-tsubclassof-same-as-uclass/451920>\
**Category:** C++\
**Tags:** tsubclassof, UClass, unreal-engine, UE4, CPP, question\
**Created:** [July 8, 2019, 5:57pm UTC](https://forums.unrealengine.com/t/is-tsubclassof-same-as-uclass/451920 "2019-07-08T17:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdgs-mrahman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bdgs-mrahman](https://forums.unrealengine.com/u/bdgs-mrahman)\
**Post date:** [July 8, 2019, 5:57pm UTC](https://forums.unrealengine.com/t/is-tsubclassof-same-as-uclass/451920/1 "2019-07-08T17:57:11Z")

</div>

I understand that TSubClassOf is safer to use than UClass\*. But are these both essentially the same?

---

<div class="post-metadata">

**Author:** ![pneuma](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pneuma/32/983845_2.png) [@pneuma](https://forums.unrealengine.com/u/pneuma)\
**Post date:** [July 8, 2019, 6:18pm UTC](https://forums.unrealengine.com/t/is-tsubclassof-same-as-uclass/451920/2 "2019-07-08T18:18:56Z")

</div>

Well… if one is safer than the other one then they cannot be the same, right? There has to be a difference somewhere.

`TSubClassOf` objects are checked at compile time where `UClass*` is being checked at runtime.

There is a pretty good answer about this here: [https://answers.unrealengine.com/questions/462096/why-use-tsubclassof-and-not-just-the-class-itself.html](https://answers.unrealengine.com/questions/462096/why-use-tsubclassof-and-not-just-the-class-itself.html)

I recommend checking it out.
