History

some cleanup and fixing of memory issue

ZappoMan committed 13 years ago

Commit d3ce3e41 parent 60dedee5 files · +81 −68Browse files

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

Unified · Split

interface/src/Application.cpp+7−2
@@ -3872,8 +3872,13 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng · 3871 unmodified lines
38723872 _voxelFades.push_back(fade);
38733873 }
38743874 // store jurisdiction details for later use
3875− _voxelServerJurisdictions[nodeID] = JurisdictionMap(_voxelSceneStats.getJurisdictionRoot(),
3876− _voxelSceneStats.getJurisdictionEndNodes());
3875+
3876+ // This is bit of fiddling is because JurisdictionMap assumes it is the owner of the values used to construct it
3877+ // but VoxelSceneStats thinks it's just returning a reference to it's contents. So we need to make a copy of the
3878+ // details from the VoxelSceneStats to construct the JurisdictionMap
3879+ JurisdictionMap jurisdictionMap;
3880+ jurisdictionMap.copyContents(_voxelSceneStats.getJurisdictionRoot(), _voxelSceneStats.getJurisdictionEndNodes());
3881+ _voxelServerJurisdictions[nodeID] = jurisdictionMap;
38773882 }
38783883 return statsMessageLength;
38793884 }

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