0
Fixed

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

Artanov Dmitry 7 years ago updated by anonymous 7 years ago 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()

Answer

Answer
Fixed

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

Answer
Fixed

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