Skip to content
New issue

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

아이템 8 + 9. finalizer와 cleaner 사용을 피하라, try-finally보다는 try-with-resources를 사용하라 #6

Open
tidavid1 opened this issue Jan 23, 2024 · 1 comment
Assignees
Labels
객체 생성과 파괴 2장 객체 생성과 파괴

Comments

@tidavid1
Copy link
Member

No description provided.

@tidavid1 tidavid1 added the 객체 생성과 파괴 2장 객체 생성과 파괴 label Jan 23, 2024
@tidavid1
Copy link
Member Author

아직까지 개발을 진행하면서 리소스 관리 측면에 대해서는 생각을 해본 적이 없었다. 이번 두 아이템 모두 리소스 관리적 측면과 관련이 있는 부분이라 주의 깊게 살펴볼 수 있는 부분이었다. finalizer와 cleaner의 경우는 GC의 불확실성에 의한 문제들이라고 생각한다. 자바에서 GC가 언제 객체를 처리할지는 아무도 모르는 부분이기에 이러한 점을 명시해야된다는 것이 중요할 것이다. try-with-resources는 자주 활용하는 부분 중 하나여서 간단히 살펴볼 수 있었다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
객체 생성과 파괴 2장 객체 생성과 파괴
Projects
None yet
Development

No branches or pull requests

3 participants