diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 83b287b7ae..9913e0d128 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3773,9 +3773,12 @@ std::map Application::prepareServerlessDomainContents(QUrl dom tmpTree->reaverageOctreeElements(); tmpTree->sendEntities(&_entityEditSender, getEntities()->getTree(), 0, 0, 0); } + std::map namedPaths = tmpTree->getNamedPaths(); - return tmpTree->getNamedPaths(); + // we must manually eraseAllOctreeElements(false) else the tmpTree will mem-leak + tmpTree->eraseAllOctreeElements(false); + return namedPaths; } void Application::loadServerlessDomain(QUrl domainURL) {