Skip to content
This repository was archived by the owner on May 13, 2020. It is now read-only.

Commit eb9b0df

Browse files
committed
improve Store memory management
1 parent 1c664dd commit eb9b0df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

RxReduce/Store.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public final class Store<State: Equatable> {
4747
self.neededReducersPerSubState[subStateType] = 1
4848
}
4949
}
50+
51+
self.reducers.reserveCapacity(self.neededReducersPerSubState.count)
5052
}
5153

5254
/// Registers a Mutator dedicated to a State/SubState mutation.

0 commit comments

Comments
 (0)