Skip to content

Flyweight pattern #8

Description

@AndrewCarterUK

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions