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

Method AllocPtr

adapter/micro_thread/mt_notify.h:269–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267 };
268
269 ValueType* AllocPtr() {
270 ValueType* ptr = NULL;
271 if (!_ptr_list.empty()) {
272 ptr = _ptr_list.front();
273 _ptr_list.pop();
274 } else {
275 ptr = new ValueType;
276 _total++;
277 }
278
279 return ptr;
280 };
281
282 void FreePtr(ValueType* ptr) {
283 if ((int)_ptr_list.size() >= _max_free) {

Callers 3

GetNtfyObjMethod · 0.80
GetTcpKeepConnMethod · 0.80
GetConnectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected