싱글턴 객체끼리 상호의존할때 그냥 AAA.Instance로 얻어오면 무한루프인데(AAA.Instance => AAA.ctor => BBB.Instance => BBB.ctor => AAA.Instance)
new Lazy<AAA>(() => AAA.Instance)를 쓰면 해결됨
싱글턴 객체끼리 상호의존할때 그냥 AAA.Instance로 얻어오면 무한루프인데(AAA.Instance => AAA.ctor => BBB.Instance => BBB.ctor => AAA.Instance)
new Lazy<AAA>(() => AAA.Instance)를 쓰면 해결됨
댓글 0