SharpMod.Entity.RemoveEntity C# (CSharp) Method

RemoveEntity() static private method

static private RemoveEntity ( IntPtr entityPointer ) : void
entityPointer IntPtr
return void
        internal static void RemoveEntity(IntPtr entityPointer)
        {
            int index = GetIndex(entityPointer);
            if (entityDictionary.ContainsKey(index)) {
                Entity entity = entityDictionary[index];
                if (entity is IDisposable) {
                    (entity as IDisposable).Dispose();
                }
                entityDictionary.Remove(index);
            }
        }