Closed
Description
MyBatis version
3.5.9
Test case or example project
Steps to reproduce
In org.apache.ibatis.session.SqlSessionManager#close
localSqlSession.set(null);
to remove the value might keep the reference to this pointer in the map, which can cause memory leak in some scenarios. Using remove()
is safer to avoid this issue.
reference java-memory-leaks
Expected result
localSqlSession.remove();