“you don’t need to check if a class is null before using it” You are absolutly wrong, again TSubclassOf is only a template for UClass*
and UClass*
is a pointer and there for can be set to null state as any other pointer. Farther more user have a option to pick None in property editor and None in blueprints = null pointer in C++. For example you can set Default Pawn to None to disable auto spawn… and it does that by checking if . So you wither need to check for null (if you dont you only risking crash) or have a NoClear specifier for property editor(which btw don’t prevent setting it to null in blueprint scripting, so you need to check anyway)… but same as any other object pointer
“you will never destroy a class when the game” As much as you wont destroy UEngine object and many other object that run permanently, does this make them different in any way?. I would even argue that UClass can be destroyed and it happens when you unload the module containing the class, UClass is gonna be also destroyed together with blueprint asset. And TSubclassOf won’t help you here, you still need to check for null.
So yes they are absolutely the same