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

频繁调用RtcServiceImpl.getInstance()会导致线程泄露? #4

Open
ThisMyWord opened this issue May 9, 2022 · 5 comments
Open

Comments

@ThisMyWord
Copy link

ThisMyWord commented May 9, 2022

创建了很多守护线程没有释放

@liuchu
Copy link

liuchu commented Jul 30, 2022

同样遇到此问题。

getInstance()的实现是new一个新对象,是否不太合理?单例返回是不是更好的选择?

@ThisMyWord
Copy link
Author

用新版本可以解决这个问题

@cnbolin
Copy link

cnbolin commented Oct 9, 2022

使用1.0.63最新tag,依旧存在此问题,关键代码:
com.volcengine.service.BaseServiceImpl. 构造器中:
this.httpClient = HttpClientFactory.create(new ClientConfiguration(), null);

create 内部每次都new Thread()

Thread deamonThread = new Thread(new IdleConnectionMonitorThread(connectionManager));
deamonThread.setDaemon(true);
deamonThread.start();

@zhouwanga
Copy link

需要手动销毁来着吧

@ChiruMori
Copy link

ChiruMori commented Aug 29, 2024

同样问题,会导致服务OOM,README 中有说明,按示例的写会有问题

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

5 participants