1
Vote

Core.Settings is not thread safe

description

The following code should not look like this:
public static Settings Instance
    {
        get
        {
            if(_instance==null)
                _instance = new Settings();
 
            return _instance;
        }
}
 
It should only return the _instance.
 
This should instead be lazy instantiated, like this:
private readonly static Settings _instance = new Settings();

comments