-
Notifications
You must be signed in to change notification settings - Fork 93
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
OSInfo singleton #387
Comments
|
Yea the implementation seems to me trivial. |
Actually: #297 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
OSInfo
struct gets the system information upon initialization.This information currently is a static information - OS version, distro, etc.
So, unless I am missing something, I propose to implement the type init function as a singleton getter, which initialize it only once per program runtime.
This way you can access it from many places in the code without fearing the performance consequences of it.
The text was updated successfully, but these errors were encountered: