- 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.