MCPcopy Create free account
hub / github.com/defold/defold / ~ConnectionPool

Method ~ConnectionPool

engine/dlib/src/dlib/connection_pool.cpp:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 ~ConnectionPool()
97 {
98 uint32_t n = m_Connections.Size();
99 int in_use = 0;
100 for (uint32_t i = 0; i < n; ++i) {
101 Connection* c = &m_Connections[i];
102 if (c->m_State == STATE_INUSE) {
103 in_use++;
104 } else if (c->m_State == STATE_CONNECTED) {
105 DoClose(this, c);
106 }
107 }
108
109 if (in_use > 0) {
110 dmLogWarning("Leaking %d connections from connection pool", in_use);
111 }
112
113 dmMutex::Delete(m_Mutex);
114 }
115 };
116
117 Result New(const Params* params, HPool* pool)

Callers

nothing calls this directly

Calls 3

DoCloseFunction · 0.85
DeleteFunction · 0.70
SizeMethod · 0.45

Tested by

no test coverage detected