baidu / sofa-pbrpc

A light-weight RPC implement of google protobuf RPC framework.
Other
2.13k stars 655 forks source link

内存问题 #238

Open RgznLbq opened 5 years ago

RgznLbq commented 5 years ago

NewClosure产生的指针什么时候释放?连续new client70个时导致内存不够而崩溃。

qinzuoyan commented 5 years ago

在Closure被调用之后会自动释放。你是不是没有触发closure被调用?

RgznLbq commented 5 years ago

完全是源码中的例子,封装成一个简单的类。这个类连接服务端服务端回复,然后什么都不做。连续new到第70个boost会捕捉到内存不足的错误。服务端调用run了。

------------------ 原始邮件 ------------------ 发件人: "QinZuoyan"notifications@github.com; 发送时间: 2019年5月20日(星期一) 下午4:37 收件人: "baidu/sofa-pbrpc"sofa-pbrpc@noreply.github.com; 抄送: "309618485"rgznlbq@foxmail.com;"Author"author@noreply.github.com; 主题: Re: [baidu/sofa-pbrpc] 内存问题 (#238)

在Closure被调用之后会自动释放。你是不是没有触发closure被调用?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.