# Should I unload a TSoftObjectPtr after loading it?

**URL:** <https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052>\
**Category:** C++\
**Tags:** unreal-engine, editor, question\
**Created:** [March 25, 2023, 12:45pm UTC](https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052 "2023-03-25T12:45:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raptcha911](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raptcha911](https://forums.unrealengine.com/u/Raptcha911)\
**Post date:** [March 25, 2023, 12:45pm UTC](https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052/1 "2023-03-25T12:45:34Z")

</div>

So, I’m using the Asset Manager to load a Data Asset that contains TSoftObjectPtr references to mesh assets. I load these mesh assets in my constructor to auto assign certain meshes. And I use LoadSynchronous to load the mesh and assign it. Should I unload this after I’m done assigning the mesh? If so, how to unload a loaded TSoftObjectPtr object?

---

<div class="post-metadata">

**Author:** ![Raptcha911](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raptcha911](https://forums.unrealengine.com/u/Raptcha911)\
**Post date:** [March 26, 2023, 8:48am UTC](https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052/2 "2023-03-26T08:48:55Z")

</div>

Does anybody have any advice?

---

<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:** [March 26, 2023, 10:54am UTC](https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052/3 "2023-03-26T10:54:01Z")

</div>

Check this thread [Unloading Assets to Free RAM?](https://forums.unrealengine.com/t/unloading-assets-to-free-ram/347153)

---

<div class="post-metadata">

**Author:** ![Raptcha911](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raptcha911](https://forums.unrealengine.com/u/Raptcha911)\
**Post date:** [March 27, 2023, 8:50am UTC](https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052/4 "2023-03-27T08:50:07Z")

</div>

Thank you for the response. The post you linked, talks about unloading the asset we loaded using AssetManager. My question has nothing to do about AssetManager. I need to know if I should unload a dereferenced TSoftObjectPtr and if so, how to do it?  
Apologies if my question was phrased in a confusing way. I should have perhaps not mentioned anything about the AssetManager.

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [March 28, 2023, 10:38am UTC](https://forums.unrealengine.com/t/should-i-unload-a-tsoftobjectptr-after-loading-it/821052/5 "2023-03-28T10:38:53Z")

</div>

You do not need to unload it manually, the dereferenced object will get garbage collected when it is no longer in use.
