Recreate fbb to avoid memory leak of FlatBuffers.
This commit is contained in:
parent
7c7237ad81
commit
031c96360d
|
@ -91,6 +91,8 @@ class FusedPullWeightKernel : public CPUKernel {
|
|||
fl_iteration_ = pull_weight_rsp->iteration();
|
||||
MS_LOG(DEBUG) << "Server is not ready for downloading yet. Reason: " << pull_weight_rsp->reason()->str()
|
||||
<< ". Retry later.";
|
||||
// Recreate fbb to avoid memory leak of FlatBuffers.
|
||||
fbb = std::make_shared<fl::FBBuilder>();
|
||||
if (!BuildPullWeightReq(fbb)) {
|
||||
MS_LOG(EXCEPTION) << "Building request for FusedDownloadWeightsByKeys failed.";
|
||||
return false;
|
||||
|
|
|
@ -190,7 +190,7 @@ bool Server::InitCommunicatorWithWorker() {
|
|||
MS_EXCEPTION_IF_NULL(http_comm);
|
||||
communicators_with_worker_.push_back(http_comm);
|
||||
}
|
||||
g_communicator_with_worker = communicator_with_worker_;
|
||||
g_communicators_with_worker = communicators_with_worker_;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue