# Are hard or soft references better when looping?

**URL:** <https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211>\
**Category:** Blueprint\
**Tags:** reference, unreal-engine, loop, question\
**Created:** [October 24, 2025, 8:18am UTC](https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211 "2025-10-24T08:18:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Extrahdmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Extrahdmi](https://forums.unrealengine.com/u/Extrahdmi)\
**Post date:** [October 24, 2025, 8:18am UTC](https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211/1 "2025-10-24T08:18:59Z")

</div>

I see a lot of articles praising soft references, but I’m wondering if I should really use them.

If i run a function on an array of class references in a loop, a hard reference is all i need, but a soft reference requires an additional load and cast.

Does this really provide a performance benefit?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 24, 2025, 8:22am UTC](https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211/2 "2025-10-24T08:22:02Z")

</div>

Soft references are not for performance, they are there to avoid loading things into memory when it’s not needed.

If you’re definitely going to be using a certain class in a BP, just use a hard ref.

The time you need soft refs are when you have a list of different classes, but you don’t know up front which one you will use when you run the blueprint.

---

<div class="post-metadata">

**Author:** ![Extrahdmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Extrahdmi](https://forums.unrealengine.com/u/Extrahdmi)\
**Post date:** [October 24, 2025, 11:06am UTC](https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211/3 "2025-10-24T11:06:55Z")

</div>

Its uses seem to be quite limited. It was quite different from what I imagined.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 24, 2025, 12:24pm UTC](https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211/4 "2025-10-24T12:24:21Z")

</div>

Yup. It’s not for efficiency, it’s to avoid loading things you don’t need.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [October 24, 2025, 6:08pm UTC](https://forums.unrealengine.com/t/are-hard-or-soft-references-better-when-looping/2668211/5 "2025-10-24T18:08:08Z")

</div>

Use Interfaces when possible over casting & references. You can create interfaces functions that return values from the interfaced class.
