-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
Description
Should the flyweight pattern be used (so that there is only ever one instance of any pin as they are remembered by the factory)?
For
- Reduces memory
- Increases performance (especially if pins auto export or configure on construction)
Against
- Memory and performance differences could be insignificant
- Might make it more difficult to switch a pin from an input to an output pin. Primary key would have to be number + direction rather than just number.
Again - interested to hear thoughts?