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