Dear Friends at Epic,
Thank you so much for UE4! Yay!
I am storing TArrays of UStructs().
New UStructs() are created locally inside a function called from DrawHUD and have no references to them after the function completes except the dynamic array they are stored in.
I periodically .Empty() the array and then refill it with new UStructs, and the old ones are no longer useful to my game.
Is there a way I can explicity delete the old UStructs() ?
Here’s my current UStruct definition:
USTRUCT()
struct FButtonStruct
{
GENERATED_USTRUCT_BODY()
//Vars
int32 type;
int32 arrayIndex;
float minX;
float maxX;
float minY;
float maxY;
//~~~~~~~~~~~~~~~~~~~
//default properties
FButtonStruct()
{
type = 255;
arrayIndex = -1;
}
};
Here’s my Dynamic Array:
TArray FileBrowserButtons;
Thanks!
Rama