강의

멘토링

커뮤니티

Inflearn Community Q&A

ksd12186050's profile image
ksd12186050

asked

Yoon Jae-seong's introductory course through hands-on experience for Spring Framework developers

9th Lecture: Bean Lifecycle

12:25 질문 드립니다.

Written on

·

197

0

ctx.close() 메서드를 호출하면 IOC 컨테이너가 가지고 있는 모든 객체가 소멸된다고 하셨는데요. 

ctx.close() 이후에 t1의 값을 찍어보면 주소는 여전히 살아있습니다. 가비지컬렉션이 추가로 필요한건가요?

 

TestBean1 의 생성자

TestBean1 의 init 메서드

t1 : kr.co.softcampus.beans.TestBean1@c0c2f8d

TestBean1 의 destroy 메서드

t1 : kr.co.softcampus.beans.TestBean1@c0c2f8d

 

 

springjava

Answer 1

0

softcampus님의 프로필 이미지
softcampus
Instructor

별도의 GC는 필요하지 않습니다. 시간이 지나면 알아서 소멸이 됩니다..

ksd12186050's profile image
ksd12186050

asked

Ask a question