You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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: