History

Merge pull request #15060 from AndrewMeadows/avoid-mem-leaked-entities

Case 21494: Avoid mem leaked entities

Shannon Romano committed 7 years ago

Commit d68f82e2 parents 00ca3bc 8a7853a3 files · +33 −15Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+4−1
@@ -3773,9 +3773,12 @@ std::map<QString, QString> Application::prepareServerlessDomainContents(QUrl dom · 3772 unmodified lines
37733773 tmpTree->reaverageOctreeElements();
37743774 tmpTree->sendEntities(&_entityEditSender, getEntities()->getTree(), 0, 0, 0);
37753775 }
3776+ std::map<QString, QString> namedPaths = tmpTree->getNamedPaths();
37763777
3777− return tmpTree->getNamedPaths();
3778+ // we must manually eraseAllOctreeElements(false) else the tmpTree will mem-leak
3779+ tmpTree->eraseAllOctreeElements(false);
37783780
3781+ return namedPaths;
37793782 }
37803783
37813784 void Application::loadServerlessDomain(QUrl domainURL) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t