| 167 | } |
| 168 | |
| 169 | void FDelegateRegistry::Unbind(void* Delegate) |
| 170 | { |
| 171 | const auto Info = Delegates.Find(Delegate); |
| 172 | if (!Info) |
| 173 | return; |
| 174 | |
| 175 | for (const auto& Handler : Info->Handlers) |
| 176 | { |
| 177 | if (!Handler.IsValid()) |
| 178 | continue; |
| 179 | if (!Info->Owner.IsStale()) |
| 180 | ((FScriptDelegate*)Delegate)->Unbind(); |
| 181 | } |
| 182 | Info->Handlers.Empty(); |
| 183 | } |
| 184 | |
| 185 | void FDelegateRegistry::Execute(const ULuaDelegateHandler* Handler, void* Params) |
| 186 | { |