Skip to content

A new instance of AutoDetectConfiguration is always created, even when the user supplies their own configuration #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
akamsteeg opened this issue May 8, 2018 · 0 comments
Assignees
Milestone

Comments

@akamsteeg
Copy link
Owner

We always create a new instance of AutoDetectConfiguration in CommandLineArguments:

private static CommandLineArgumentsConfiguration _configuration = new AutoDetectConfiguration();

Later, when the user supplies their own Configuration we don't need that anymore so it's wasted cycles and memory.

Suggestion: Create a new instance of AutoDetectConfiguration in the getter of CommandLineArguments.Configuration when the backing field _configuration is null and assign it to the field before returning it.

@akamsteeg akamsteeg added this to the 2.0.0 milestone May 8, 2018
@akamsteeg akamsteeg self-assigned this May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant