xuyicheng1995 commented on issue #4475:
URL: https://github.com/apache/shenyu/issues/4475#issuecomment-1471295941
> code like this:
>
> ```
> public static void mswtMapTest() {
> for (int i = 0; i < 10; i++) {
> MemorySafeWindowTinyLFUMap<String, Byte[]> map = new
MemorySafeWindowTinyLFUMap<>(1, 100);
> map.put(String.valueOf(i), new Byte[M_1 * 2]);
> map = null;
> // 手动GC
> }
> }
> ```
i think this code will cause memory link, your test is about caffine cache,
but caffine cache is held by a instance of MemorySafeWindowTinyLFUMap, so if
org.apache.shenyu.common.cache.MemorySafeWindowTinyLFUMap#ALL do not remove
this instance, gc not works
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]