Hello Everyone,
I’m looking to better understand the “new” expression and how Unreal Manages its memory.
- Is the “new” expression congruent with the C++ version?
- Do I need to be erasing instances I’ve instanced using new?
- Do I need to worry about memory leaks in general? If so, how should I erase the potentially leaked memory?
- Are there any good resources about UE4s Heap Handling to which I could be pointed?
Lastly, I was curious about using new in a function call. Would that be a memory leak? I made an example below. Is this an acceptable use of the “new” expression:
Func Def:
void DoFoo(FSomeStruct * InSomeStruct)
{
SomeStruct = InSomeStruct;
}
Code:
DoFoo(new FSomeStruct());
…
…More Code…
…
DoFoo(new FSomeStruct());
Thanks for your help everyone:)