Here are the examples of the csharp api System.Collections.Generic.Dictionary.Remove(UObject) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
Source : Invoker.cs
with MIT License
from pixeltris
with MIT License
from pixeltris
private void RemoveInvokerFromInvokersByUObject()
{
if (invokersByUObjectIndex >= 0)
{
UObject obj = Owner as UObject;
if (obj != null)
{
List<Invoker> invokers;
if (invokersByUObject.TryGetValue(obj, out invokers) && invokers.Count > 0)
{
Invoker lastInvoker = invokers[invokers.Count - 1];
invokers.RemoveAtSwapEx(ref invokersByUObjectIndex, ref lastInvoker.invokersByUObjectIndex);
if (invokers.Count == 0)
{
invokersByUObject.Remove(obj);
}
}
}
invokersByUObjectIndex = -1;
}
}
19
Source : Coroutine.Update.cs
with MIT License
from pixeltris
with MIT License
from pixeltris
internal static void RemoveObjectByGC(UObject obj)
{
List<Coroutine> collection;
if (coroutinesByObject.TryGetValue(obj, out collection))
{
foreach (Coroutine coroutine in collection)
{
coroutine.Stop();
}
coroutinesByObject.Remove(obj);
}
}