# Does 'Resolving' a Soft Class Reference to 'Get Class Defaults' Create a Hard Reference?

**URL:** <https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4-26, Blueprint, question\
**Created:** [August 20, 2022, 1:55pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987 "2022-08-20T13:55:41Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [August 20, 2022, 1:55pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/1 "2022-08-20T13:55:41Z")

</div>

As the titles suggests… if I take a soft class reference and ‘resolve’ it, in order to Get Class Defaults, does that create a hard reference or is this a memory safe technique? Thanks!

![SoftToHard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/8/1b8650b6c4f2668cd26c38076611175728950dc1.jpeg)

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [August 20, 2022, 2:14pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/2 "2022-08-20T14:14:47Z")

</div>

A soft class reference is just a path, it can be used without loading a class into memory. Once you load (“resolve”) it you will load the entire class into memory.

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [August 20, 2022, 2:19pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/3 "2022-08-20T14:19:14Z")

</div>

Thank you, that’s helpful!

However, I’m still a bit confused because I just created an empty BP with a soft class reference variable and then found that it’s loading gigabytes of other assets into memory, which I thought a soft reference was exactly NOT supposed to do?

Am I misunderstanding something?

 ![SoftTestBP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/8/cc8d2402fc50a8e6fe16e728ba7c97109bd05272.jpeg)

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [August 20, 2022, 2:24pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/4 "2022-08-20T14:24:06Z")

</div>

I never used this SizeMap tool, can’t say if this is the requirement if everything is loaded or if it is the actual currently used memory. It’s a bit high! Soft pointers / references do not load the entire class into memory. In BP the purple pins are hard class references which you should avoid. You can’t always avoid loading things into memory, you will load the attached ActorComponents, parent class etc at all times.

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [August 20, 2022, 2:57pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/5 "2022-08-20T14:57:53Z")

</div>

Size map shows either the size of disk or memory reference chains (similar to the Reference Viewer) and is supposed to be the tool to use when cleaning up reference dependencies. It’s helped me reduce memory load in my project tremendously and hasn’t lied to me, yet.

Everything I’ve read says ‘soft references aren’t loaded into memory until you specifically load them’ but what I’m seeing in the Size Map says otherwise. Confused.

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [August 20, 2022, 3:00pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/6 "2022-08-20T15:00:53Z")

</div>

You could try the profiler tools to monitor memory:

> **[Profiler Tool Reference](https://docs.unrealengine.com/4.27/en-US/TestingAndOptimization/PerformanceAndProfiling/Profiler/)**
>
> An overview on the Profiler Tool used to monitor game performance.

Or hook into a standalone process of the game and see if it matches expectations?

---

<div class="post-metadata">

**Author:** ![UnrealEverything](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealEverything](https://forums.unrealengine.com/u/UnrealEverything)\
**Post date:** [August 20, 2022, 9:22pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/7 "2022-08-20T21:22:51Z")

</div>

The hard reference to class `W_Parent` comes from the variable itself regardless of whether it is set to `None`, `W_Parent` or some subclass of `W_Parent`. The effects/benefit of the soft class reference comes into play when you actually assign some subclass of `W_Parent` since it prevents creating a hard reference to that class (`BP_ClassC_ChildOfB` in the example below). You may be able to change the type of the soft class reference to whatever is the base of W\_Parent.

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/0/9909a3cb95c9d91fdc8339421ff49fdbd1cce5b8.png)

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [August 20, 2022, 10:36pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/8 "2022-08-20T22:36:30Z")

</div>

A-ha! I think you might have just cracked it wide open for me! Starting to make sense… I need to experiment with a few things, thank you!

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [August 20, 2022, 10:53pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/9 "2022-08-20T22:53:24Z")

</div>

One thing to keep in mind is the difference between resolve and actually loading the class.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/d/9bd76190f618dfbddba3afb0bfb3591465ae149f.png)

---

<div class="post-metadata">

**Author:** ![M0rph3u5\_UK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/m0rph3u5_uk/32/899226_2.png) [@M0rph3u5\_UK](https://forums.unrealengine.com/u/M0rph3u5_UK)\
**Post date:** [August 20, 2022, 11:22pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/10 "2022-08-20T23:22:02Z")

</div>

Hi  
I just recently learned about soft vs hard object/class references.  
I found this article tremendously helpful in demystifying the principle of soft vs hard object references:  
[https://medium.com/advanced-blueprint-scripting-in-unreal-engine/object-references-in-blueprints-4c0df7f4dc1d](https://medium.com/advanced-blueprint-scripting-in-unreal-engine/object-references-in-blueprints-4c0df7f4dc1d)

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [August 21, 2022, 1:58pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/11 "2022-08-21T13:58:47Z")

</div>

Indeed, very helpful article. He touches on one of the things that had me so confused…

“Beware though, the type is still loaded when using soft references, so if the type is `BP_Weapon` , it’s still going to be loaded with all its dependencies; therefore, it’s best if you use a C++ base class for variable types (you can still have a BP base class inherited from the C++ one), or a minimalist BP parent class.”

I think it’s time for me to learn C++.

---

<div class="post-metadata">

**Author:** ![M0rph3u5\_UK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/m0rph3u5_uk/32/899226_2.png) [@M0rph3u5\_UK](https://forums.unrealengine.com/u/M0rph3u5_UK)\
**Post date:** [August 21, 2022, 5:58pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/12 "2022-08-21T17:58:21Z")

</div>

Yup, Knowledge and incorporation of C++ will eventually become inevitable at some point :-/

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [August 23, 2022, 7:13am UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/13 "2022-08-23T07:13:19Z")

</div>

Once you get good at c++ you can work faster than in BP and manage / update thousands of lines of code with a few clicks where BP would just roll over and fart requiring you to take a whole week to update BP.

---

<div class="post-metadata">

**Author:** ![real.dude](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@real.dude](https://forums.unrealengine.com/u/real.dude)\
**Post date:** [October 31, 2022, 10:36pm UTC](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/14 "2022-10-31T22:36:46Z")

</div>

Hey, that’s a great article, much appreciate it!
