Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2016-06-02 15:55:13 +0300
committerYuri Gorshenin <y@maps.me>2016-06-03 00:29:29 +0300
commit573021d80952bb9b82af4bac6b03622c7231b936 (patch)
tree01b19e942d4140fc537fc70771574cba62d2905d /indexer/index.hpp
parent3dff889eb4e1aa49bfd8f7226b7ec80499a33a8e (diff)
[index] Fixed massive descriptors leaks.
Diffstat (limited to 'indexer/index.hpp')
-rw-r--r--indexer/index.hpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/indexer/index.hpp b/indexer/index.hpp
index 7e4fa77153..09d61b9f1d 100644
--- a/indexer/index.hpp
+++ b/indexer/index.hpp
@@ -20,23 +20,15 @@
#include "std/utility.hpp"
#include "std/vector.hpp"
-
-class MwmInfoEx : public MwmInfo
-{
-public:
- unique_ptr<feature::FeaturesOffsetsTable> m_table;
-};
-
class MwmValue : public MwmSet::MwmValueBase
{
public:
FilesContainerR const m_cont;
IndexFactory m_factory;
platform::LocalCountryFile const m_file;
- feature::FeaturesOffsetsTable const * m_table;
+ unique_ptr<feature::FeaturesOffsetsTable> m_table;
explicit MwmValue(platform::LocalCountryFile const & localFile);
- void SetTable(MwmInfoEx & info);
inline feature::DataHeader const & GetHeader() const { return m_factory.GetHeader(); }
inline version::MwmVersion const & GetMwmVersion() const { return m_factory.GetMwmVersion(); }
@@ -97,7 +89,7 @@ private:
covering::IntervalsT const & interval = cov.Get(lastScale);
// Prepare features reading.
- FeaturesVector const fv(pValue->m_cont, header, pValue->m_table);
+ FeaturesVector const fv(pValue->m_cont, header, pValue->m_table.get());
ScaleIndex<ModelReaderPtr> index(pValue->m_cont.GetReader(INDEX_FILE_TAG),
pValue->m_factory);
@@ -224,7 +216,8 @@ public:
if (handle.IsAlive())
{
MwmValue const * pValue = handle.GetValue<MwmValue>();
- FeaturesVector const featureReader(pValue->m_cont, pValue->GetHeader(), pValue->m_table);
+ FeaturesVector const featureReader(pValue->m_cont, pValue->GetHeader(),
+ pValue->m_table.get());
do
{
osm::Editor::FeatureStatus const fts = editor.GetFeatureStatus(id, fidIter->m_index);