We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sobok-iOS/SobokSobok/SobokSobok/Service/Network/APIServices/Account/AddAccontAPI.swift
Lines 11 to 16 in 645498d
클래스의 경우 메모리를 가르키기 때문에(참조) 인스턴스를 공유하지만, 구조체는 value type 이기 때문에 값을 복사합니다.
만약, AddAccountAPI.shared 로 접근한다면, 값 변경이 이루어질 수 없을 뿐만 아니라 접근 할 때마다 다른 메모리를 보고있기 때문에 싱글톤이라고 보기 힘듭니다.
AddAccountAPI.shared
만약 싱글톤의 의미대로 인스턴스를 공유하며 주소를 공유하는 형태로 사용하려면 Class 를 사용하는게 좋아보입니다. ref. https://hyerios.tistory.com/254
Class
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sobok-iOS/SobokSobok/SobokSobok/Service/Network/APIServices/Account/AddAccontAPI.swift
Lines 11 to 16 in 645498d
구조체는 인스턴스를 공유하지 않습니다.
클래스의 경우 메모리를 가르키기 때문에(참조) 인스턴스를 공유하지만, 구조체는 value type 이기 때문에 값을 복사합니다.
만약,
AddAccountAPI.shared
로 접근한다면, 값 변경이 이루어질 수 없을 뿐만 아니라 접근 할 때마다 다른 메모리를 보고있기 때문에 싱글톤이라고 보기 힘듭니다.만약 싱글톤의 의미대로 인스턴스를 공유하며 주소를 공유하는 형태로 사용하려면
Class
를 사용하는게 좋아보입니다.ref. https://hyerios.tistory.com/254
The text was updated successfully, but these errors were encountered: