Skip to content

Conversation

@SW-H
Copy link

@SW-H SW-H commented Jun 21, 2023

image

@SW-H SW-H changed the title 추상팩토리패턴 & 싱글톤 [한승원]추상팩토리패턴 & 싱글톤 Jun 21, 2023
@SW-H SW-H changed the title [한승원]추상팩토리패턴 & 싱글톤 [한승원] 추상팩토리패턴 & 싱글톤 Jun 21, 2023
@SW-H SW-H self-assigned this Jun 21, 2023
private final GUIFactory factory;
private Button button;

public Application(GUIFactory factory) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

생성할 때 같이 createUI를 실행해줘야 할 것 같아요!
혹시나 paint()를 먼저 실행하면 nullPointerException이 ㅠ0ㅠ

private MacFactory() {
}

public static MacFactory getInstance() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

동시성 문제가 있으니 이전에 발표했었던 inner static class로 변경해보시는건 어떨까요!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants