mirror of https://gitee.com/bigwinds/arangodb
fix memleak
This commit is contained in:
parent
90ff8508ac
commit
b40f95512f
|
@ -122,11 +122,13 @@ static void CleanupDocumentCollection (TRI_vocbase_col_t* collection,
|
||||||
|
|
||||||
if (! isUnloading) {
|
if (! isUnloading) {
|
||||||
popped = false;
|
popped = false;
|
||||||
ditches->process(popped, [] (triagens::arango::Ditch const* ditch) -> bool {
|
auto unloader = ditches->process(popped, [] (triagens::arango::Ditch const* ditch) -> bool {
|
||||||
return (ditch->type() == triagens::arango::Ditch::TRI_DITCH_COLLECTION_UNLOAD);
|
return (ditch->type() == triagens::arango::Ditch::TRI_DITCH_COLLECTION_UNLOAD);
|
||||||
});
|
});
|
||||||
if (popped) {
|
if (popped) {
|
||||||
// we've changed the list. try with current state in next turn
|
// we've changed the list. try with current state in next turn
|
||||||
|
TRI_ASSERT(unloader != nullptr);
|
||||||
|
delete unloader;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue