Skip to content

4.0.1

Compare
Choose a tag to compare
@jnizet jnizet released this 05 Mar 08:37
· 2 commits to master since this release
  • fix #97: memory leak in com.ninjasquad.springmockk.MockkClear. In projects where many different Spring contextx are created during tests, even though the Spring test context caches ends up destroying old ones, SpringMockK retained references to mocks, themselves retaining references to the Spring context, and leading to high memory usage. SpringMockK now uses weak references in order to not prevent the garbage collector to collect those mocks if they're only referenced by SpringMockK, for clearing purposes.