@@ -199,10 +199,6 @@ void Cellappmgr::reqCreateInNewSpace(Mercury::Channel* pChannel, MemoryStream& s
199
199
static SPACE_ID spaceID = 1 ;
200
200
201
201
Mercury::Bundle* pBundle = Mercury::Bundle::ObjPool ().createObject ();
202
- ForwardItem* pFI = new ForwardItem ();
203
- pFI->pHandler = NULL ;
204
-
205
- pFI->pBundle = pBundle;
206
202
(*pBundle).newMessage (CellappInterface::onCreateInNewSpaceFromBaseapp);
207
203
(*pBundle) << entityType;
208
204
(*pBundle) << id;
@@ -223,14 +219,16 @@ void Cellappmgr::reqCreateInNewSpace(Mercury::Channel* pChannel, MemoryStream& s
223
219
if (cinfos == NULL || cinfos->pChannel == NULL )
224
220
{
225
221
WARNING_MSG (" Cellappmgr::reqCreateInNewSpace: not found cellapp, message is buffered.\n " );
222
+ ForwardItem* pFI = new ForwardItem ();
223
+ pFI->pHandler = NULL ;
224
+ pFI->pBundle = pBundle;
226
225
forward_cellapp_messagebuffer_.push (pFI);
227
226
return ;
228
227
}
229
228
else
230
229
{
231
230
(*pBundle).send (this ->networkInterface (), cinfos->pChannel );
232
231
Mercury::Bundle::ObjPool ().reclaimObject (pBundle);
233
- SAFE_RELEASE (pFI);
234
232
}
235
233
}
236
234
@@ -248,10 +246,6 @@ void Cellappmgr::reqRestoreSpaceInCell(Mercury::Channel* pChannel, MemoryStream&
248
246
s >> spaceID;
249
247
250
248
Mercury::Bundle* pBundle = Mercury::Bundle::ObjPool ().createObject ();
251
- ForwardItem* pFI = new ForwardItem ();
252
- pFI->pHandler = NULL ;
253
-
254
- pFI->pBundle = pBundle;
255
249
(*pBundle).newMessage (CellappInterface::onRestoreSpaceInCellFromBaseapp);
256
250
(*pBundle) << entityType;
257
251
(*pBundle) << id;
@@ -272,14 +266,16 @@ void Cellappmgr::reqRestoreSpaceInCell(Mercury::Channel* pChannel, MemoryStream&
272
266
if (cinfos == NULL || cinfos->pChannel == NULL )
273
267
{
274
268
WARNING_MSG (" Cellappmgr::reqRestoreSpaceInCell: not found cellapp, message is buffered.\n " );
269
+ ForwardItem* pFI = new ForwardItem ();
270
+ pFI->pHandler = NULL ;
271
+ pFI->pBundle = pBundle;
275
272
forward_cellapp_messagebuffer_.push (pFI);
276
273
return ;
277
274
}
278
275
else
279
276
{
280
277
(*pBundle).send (this ->networkInterface (), cinfos->pChannel );
281
278
Mercury::Bundle::ObjPool ().reclaimObject (pBundle);
282
- SAFE_RELEASE (pFI);
283
279
}
284
280
}
285
281
0 commit comments