Skip to content

Commit b4eeec9

Browse files
committed
修复一处内存可能会泄漏的bug
1 parent fa3a1ff commit b4eeec9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎kbe/src/server/baseapp/base.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -948,9 +948,6 @@ void Base::onCellWriteToDBCompleted(CALLBACK_ID callbackID)
948948
if(this->DBID_ > 0)
949949
isArchiveing_ = false;
950950

951-
MemoryStream* s = MemoryStream::ObjPool().createObject();
952-
addPersistentsDataToStream(ED_FLAG_ALL, s);
953-
954951
Components::COMPONENTS& cts = Components::getSingleton().getComponents(DBMGR_TYPE);
955952
Components::ComponentInfos* dbmgrinfos = NULL;
956953

@@ -963,6 +960,9 @@ void Base::onCellWriteToDBCompleted(CALLBACK_ID callbackID)
963960
return;
964961
}
965962

963+
MemoryStream* s = MemoryStream::ObjPool().createObject();
964+
addPersistentsDataToStream(ED_FLAG_ALL, s);
965+
966966
Mercury::Bundle* pBundle = Mercury::Bundle::ObjPool().createObject();
967967
(*pBundle).newMessage(DbmgrInterface::writeEntity);
968968

0 commit comments

Comments
 (0)