0
Исправлено

Реализация одиночки (singleton)

Artanov Dmitry il y a 7 ans mis à jour par anonymous il y a 7 ans 1

Нужно в псевдокод

static method getInstance() is

        if (this.instance == null) then
            acquireThreadLock() and then
                this.instance = new Singleton()

добавить ещё одну проверку

static method getInstance() is

        if (this.instance == null) then
            acquireThreadLock() and then
                if (this.instance == null) then
                    this.instance = new Singleton()

Solution

Solution
Исправлено

Исправил, спасибо!

Solution
Исправлено

Исправил, спасибо!