Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

会有内存泄漏的问题吗? #34

Closed
yun738243875 opened this issue Sep 28, 2018 · 3 comments
Closed

会有内存泄漏的问题吗? #34

yun738243875 opened this issue Sep 28, 2018 · 3 comments

Comments

@yun738243875
Copy link

image

这里直接 new 了一个新的 RedisClient ,原来的 RedisClient 没有释放,会不会有内存泄漏的问题。

@2881099
Copy link
Owner

2881099 commented Sep 28, 2018

感谢反馈,这里交由自动回收管理了。

也可以显示调用 try { conn.Client.Dispose(); } catch {}

@yun738243875
Copy link
Author

感谢反馈,这里交由自动回收管理了。

也可以显示调用 try { conn.Client.Dispose(); } catch {}

啊?哪里有自动回收啊?前一个对象的引用都没有了吧?

@2881099
Copy link
Owner

2881099 commented Sep 28, 2018

感谢反馈,实测确实有泄漏问题。

泄露条件:在与 redis-server 断开连接后,不断尝试创建新的 RedisClient 对象。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants