refactor: memory leaks caused by behaviour collectors fixed
This commit is contained in:
@@ -17,8 +17,6 @@ public class BehaviourCollector<T> : IBehaviourCollector<T> where T : class
|
||||
public IReadOnlyList<T> Behaviours => behaviours;
|
||||
public IUniverse Universe { get; private set; } = null!;
|
||||
|
||||
public T this[Index index] => behaviours[index];
|
||||
|
||||
public BehaviourCollector() { }
|
||||
public BehaviourCollector(IUniverse universe) => Assign(universe);
|
||||
|
||||
@@ -98,7 +96,4 @@ public class BehaviourCollector<T> : IBehaviourCollector<T> where T : class
|
||||
OnUnassigned?.Invoke(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator() => behaviours.GetEnumerator();
|
||||
IEnumerator IEnumerable.GetEnumerator() => behaviours.GetEnumerator();
|
||||
}
|
||||
|
Reference in New Issue
Block a user