bool UPanelWidget::RemoveChildAt(int32 Index)
{
if ( Index < 0 || Index >= Slots.Num() )
{
return false;
}
UPanelSlot* Slot = Slots[Index];
if ( Slot->Content )
{
Slot->Content->Slot = nullptr;
}
Slots.RemoveAt(Index);
OnSlotRemoved(Slot);
Slot->Parent = nullptr;
Slot->Content = nullptr;
const bool bReleaseChildren = true;
Slot->ReleaseSlateResources(bReleaseChildren);
return true;
}
since Slot->Content already being set to nullptr. SlotSlot->ReleaseSlateResources(bReleaseChildren) actually do nothing. I think it should put right after UPanelSlot* Slot = Slots[Index]; …