simple refactoring

This commit is contained in:
Mikhail 2023-06-10 20:01:51 +08:00
parent 012378f41b
commit c220222e7c

View File

@ -28,9 +28,6 @@ namespace DCFApixels.DragonECS
Type systemType = system.GetType();
foreach (var property in GetAllPropertiesFor(systemType))
{
if (property.GetAutoInjectAttribute() == null)
continue;
Type fieldType = property.PropertyType;
List<InjectedPropertyRecord> list;
if (!_systemProoperties.TryGetValue(fieldType, out list))
@ -38,7 +35,6 @@ namespace DCFApixels.DragonECS
list = new List<InjectedPropertyRecord>();
_systemProoperties.Add(fieldType, list);
}
list.Add(new InjectedPropertyRecord(system, property));
}
}
@ -202,7 +198,7 @@ namespace DCFApixels.DragonECS
private void ClearUsless()
{
_autoInjectionMap = null;
GC.Collect(0); //Ñîáðàòü âñå õëàìîâûå ñîçäàííå âðåìÿ ìèíè êëàññû
GC.Collect(0); //Собрать все хламовые мини классы созданне временно
}
}