MCPcopy Create free account
hub / github.com/F-Stack/f-stack / FreeNtfyObj

Method FreeNtfyObj

adapter/micro_thread/mt_notify.cpp:423–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void NtfyObjMgr::FreeNtfyObj(KqueuerObj* obj)
424{
425 SessionProxy* proxy = NULL;
426 if (!obj) {
427 return;
428 }
429
430 int type = obj->GetNtfyType();
431 obj->Reset();
432
433 switch (type)
434 {
435 case NTFY_OBJ_THREAD:
436 return _fd_ntfy_pool.FreePtr(obj);
437 break;
438
439 case NTFY_OBJ_SESSION:
440 proxy = dynamic_cast<SessionProxy*>(obj);
441 return _udp_proxy_pool.FreePtr(proxy);
442 break;
443
444 case NTFY_OBJ_KEEPALIVE:
445 break;
446
447 default:
448 break;
449 }
450
451 delete obj;
452 return;
453}

Callers 4

GetNtfyObjMethod · 0.95
~IMtConnectionMethod · 0.80
ResetMethod · 0.80
mt_tcp_get_keep_connFunction · 0.80

Calls 3

GetNtfyTypeMethod · 0.80
FreePtrMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected