Heya! I have a UWidget class where I overrode the RebuildWidget() function to do some SImage drawing. In the constructor, I create a bunch of UTexture2D and FSlateBrush. My question is: do I need to delete these myself in a destructor, or are they handled automatically?
Member vars:
TArray<UTexture2D*> TallyImages;
TArray<FSlateBrush*> TallyBrushes;
Constructor:
UTallyPageUI::UTallyPageUI()
{
ConstructorHelpers::FObjectFinder<UTexture2D> Tally1Ref(TEXT("Texture2D'/Game/2DSideScrollerAssets/Textures/UI/Tally/Tally1'"));
TallyImages.Add(Tally1Ref.Object);
TallyBrushes.Add(new FSlateDynamicImageBrush(TallyImages[0], FVector2D(48, 46), FName("Tally1")));
...4 more of the above block with different numbers
}