MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / freeListObject

Function freeListObject

src/object.cpp:328–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void freeListObject(robj_roptr o) {
329 if (o->encoding == OBJ_ENCODING_QUICKLIST) {
330 quicklistRelease((quicklist*)ptrFromObj(o));
331 } else if (o->encoding == OBJ_ENCODING_ZIPLIST) {
332 zfree(ptrFromObj(o));
333 } else {
334 serverPanic("Unknown list encoding type: %d", o->encoding);
335 }
336}
337
338void freeSetObject(robj_roptr o) {
339 switch (o->encoding) {

Callers 1

decrRefCountFunction · 0.85

Calls 3

quicklistReleaseFunction · 0.85
ptrFromObjFunction · 0.85
zfreeFunction · 0.85

Tested by

no test coverage detected