//------------------------------------------------------------------------ void SUIElementLuaCallback::Clear() { if (gEnv->pFlashUI) { const int count = gEnv->pFlashUI->GetUIElementCount(); for (int i = 0; i < count; ++i) { IUIElementIteratorPtr elements = gEnv->pFlashUI->GetUIElement(i)->GetInstances(); while (IUIElement* pInst = elements->Next()) pInst->RemoveEventListener(this); } } ClearCallbacks(); }
void USocketIOClientComponent::UninitializeComponent() { //Because our connections can last longer than game world //end, we let plugin-scoped structures manage our memory. //We must ensure we set our pointer to null however. ClearCallbacks(); //If we're a regular connection we should close and release when we quit if (!bPluginScopedConnection) { ISocketIOClientModule::Get().ReleaseNativePointer(NativeClient); NativeClient = nullptr; } //UE_LOG(SocketIOLog, Log, TEXT("UninitializeComponent() call")); Super::UninitializeComponent(); }
USocketIOClientComponent::USocketIOClientComponent(const FObjectInitializer &init) : UActorComponent(init) { bShouldAutoConnect = true; bWantsInitializeComponent = true; bAutoActivate = true; NativeClient = nullptr; bLimitConnectionToGameWorld = true; AddressAndPort = FString(TEXT("http://localhost:3000")); //default to 127.0.0.1 SessionId = FString(TEXT("Invalid")); //Plugin scoped utilities bPluginScopedConnection = false; PluginScopedId = TEXT("Default"); bVerboseConnectionLog = true; ReconnectionTimeout = 0.f; MaxReconnectionAttempts = -1.f; ReconnectionDelayInMs = 5000; ClearCallbacks(); }
CUpdateableCtrl::CUpdateableCtrl() { ClearCallbacks(); }
//------------------------------------------------------------------------ void SUIEventSystemLuaCallback::Clear() { m_Listener.clear(); ClearCallbacks(); }
//------------------------------------------------------------------------ void SUIActionLuaCallback::Clear() { ClearCallbacks(); }