创建多窗口问题

我在项目中用Slate 创建了一个SWindow.用的 SNew(SWindow).
现在我希望将UMG渲染到这个窗口中,从网上找的各种方式,基本方式是使用

	CreatedWidget = CreateWidget(GetWorld(), WidgetType);
	TSharedPtr<SWidget> SlateWidget = CreatedWidget->TakeWidget();

	WindowHandle->SetContent(SlateWidget.ToSharedRef());

通过这种方式渲染一个UI到副窗口。

但是在我希望结束的时候或者销毁窗口的时候使用RequestDestroyWindow进行销毁。会导致共享指针或者共享引用出现冲突,GC出现问题。
PIE下的问题是

Ensure condition failed: GExitPurge || !IsGarbageCollecting() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\UMG\Private\Slate\SObjectWidget.cpp] [Line: 43] 
SObjectWidget for 'WBP_Test_C /Engine/Transient.UnrealEdEngine_0:GameInstance_0.WBP_Test_C_0' destroyed while collecting garbage.  This can lead to multiple GCs being required to cleanup the object.  Possible causes might be,
1) ReleaseSlateResources not being implemented for the owner of this pointer.
2) You may just be holding onto some slate pointers on an actor that don't get reset until the actor is Garbage Collected.  You should avoid doing this, and instead reset those references when the actor is Destroyed.
[2024-03-28T03:10:28.925Z]LogOutputDevice: Error: Ensure condition failed: GExitPurge || !IsGarbageCollecting() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\UMG\Private\Slate\SObjectWidget.cpp] [Line: 43] 
SObjectWidget for 'WBP_Test_C /Engine/Transient.UnrealEdEngine_0:GameInstance_0.WBP_Test_C_0' destroyed while collecting garbage.  This can lead to multiple GCs being required to cleanup the object.  Possible causes might be,
1) ReleaseSlateResources not being implemented for the owner of this pointer.
2) You may just be holding onto some slate pointers on an actor that don't get reset until the actor is Garbage Collected.  You should avoid doing this, and instead reset those references when the actor is Destroyed.

我现在不太清楚是什么地方使用有问题。