MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / assign

Method assign

src/common/classes/RefCounted.h:225–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223
224 protected:
225 T* assign(T* const p)
226 {
227 if (ptr != p)
228 {
229 if (p)
230 {
231 p->addRef();
232 }
233
234 T* tmp = ptr;
235 ptr = p;
236
237 if (tmp)
238 {
239 tmp->release();
240 }
241 }
242
243 return p;
244 }
245
246 private:
247 T* ptr;

Callers

nothing calls this directly

Calls 2

addRefMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected