Skip to content

Flyweight pattern #8

@AndrewCarterUK

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions