# Ran out of memory due to UI?

**URL:** <https://forums.unrealengine.com/t/ran-out-of-memory-due-to-ui/352611>\
**Category:** UI\
**Tags:** crashes, unreal-engine, memory, UI, CPP, Blueprint, question\
**Created:** [April 2, 2016, 1:07pm UTC](https://forums.unrealengine.com/t/ran-out-of-memory-due-to-ui/352611 "2016-04-02T13:07:13Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [April 3, 2016, 2:00pm UTC](https://forums.unrealengine.com/t/ran-out-of-memory-due-to-ui/352611/12 "2016-04-03T14:00:21Z")

</div>

in questObjective.h, you are using:

```
void SetQuestObjective(FString objectiveName = "Test Objective");

```

usually when i see an FString set by a literal string, its surrounded by TEXT() for some reason.

```
void SetQuestObjective(FString objectiveName = FString(TEXT("Test Objective")));

```

not sure if that is related to your memory problem, but it is near the area that the out of memory error is complaining about. maybe every time you are creating one of these objectives, it is converting the ANSI text to TCHAR which is less efficient.

> **[String Handling](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/StringHandling/)**
>
> An overview of the string classes available in UE4 and reference guides for FName, FText, and FString.

* * *

also this is related to the other discussion of structs replacing objects for state data and small common parts:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

* * *

do you only run out of memory after adding quests to the list?

im not too familiar with the profiler tools, but this video might help you debug your problem:

https://docs.unrealengine.com/latest/INT/Engine/Performance/

---

_[View the full topic](https://forums.unrealengine.com/t/ran-out-of-memory-due-to-ui/352611)._
