Commit 1295cd62 authored by Thery Sylvain's avatar Thery Sylvain

resolve bug of static variable in plugins

parent 2de7c84b
...@@ -110,6 +110,9 @@ void MapParameters::stop(MapHandlerGen* mh) ...@@ -110,6 +110,9 @@ void MapParameters::stop(MapHandlerGen* mh)
bool Surface_Deformation_Plugin::enable() bool Surface_Deformation_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_Deformation_DockTab(m_schnapps, this); m_dockTab = new Surface_Deformation_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Deformation"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Deformation");
...@@ -539,11 +542,7 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh) ...@@ -539,11 +542,7 @@ void Surface_Deformation_Plugin::asRigidAsPossible(MapHandlerGen* mh)
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_Deformation_Plugin, Surface_Deformation_Plugin) Q_EXPORT_PLUGIN2(Surface_Deformation_Plugin, Surface_Deformation_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_Deformation_PluginD, Surface_Deformation_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -13,6 +13,9 @@ namespace SCHNApps ...@@ -13,6 +13,9 @@ namespace SCHNApps
bool Surface_DifferentialProperties_Plugin::enable() bool Surface_DifferentialProperties_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_computeNormalDialog = new Dialog_ComputeNormal(m_schnapps); m_computeNormalDialog = new Dialog_ComputeNormal(m_schnapps);
m_computeCurvatureDialog = new Dialog_ComputeCurvature(m_schnapps); m_computeCurvatureDialog = new Dialog_ComputeCurvature(m_schnapps);
...@@ -292,11 +295,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature( ...@@ -292,11 +295,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_DifferentialProperties_Plugin, Surface_DifferentialProperties_Plugin) Q_EXPORT_PLUGIN2(Surface_DifferentialProperties_Plugin, Surface_DifferentialProperties_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_DifferentialProperties_PluginD, Surface_DifferentialProperties_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -16,7 +16,8 @@ class Surface_Import_Plugin : public PluginProcessing ...@@ -16,7 +16,8 @@ class Surface_Import_Plugin : public PluginProcessing
public: public:
Surface_Import_Plugin() Surface_Import_Plugin()
{} {
}
~Surface_Import_Plugin() ~Surface_Import_Plugin()
{} {}
......
...@@ -16,6 +16,9 @@ namespace SCHNApps ...@@ -16,6 +16,9 @@ namespace SCHNApps
bool Surface_Import_Plugin::enable() bool Surface_Import_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
importAction = new QAction("import", this); importAction = new QAction("import", this);
m_schnapps->addMenuAction(this, "Surface;Import", importAction); m_schnapps->addMenuAction(this, "Surface;Import", importAction);
connect(importAction, SIGNAL(triggered()), this, SLOT(importFromFileDialog())); connect(importAction, SIGNAL(triggered()), this, SLOT(importFromFileDialog()));
...@@ -28,6 +31,12 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName) ...@@ -28,6 +31,12 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
if(fi.exists()) if(fi.exists())
{ {
MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2); MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2);
std::cout << "IMPORT PLUGIN 2" << std::endl;
std::cout << "PTR="<< GenericMap::s_instances<< std::endl;
for (auto inst : *GenericMap::s_instances)
std::cout << inst<< std::endl;
if(mhg) if(mhg)
{ {
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(mhg); MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(mhg);
...@@ -62,11 +71,7 @@ void Surface_Import_Plugin::importFromFileDialog() ...@@ -62,11 +71,7 @@ void Surface_Import_Plugin::importFromFileDialog()
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_Import_Plugin, Surface_Import_Plugin) Q_EXPORT_PLUGIN2(Surface_Import_Plugin, Surface_Import_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_Import_PluginD, Surface_Import_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -24,6 +24,9 @@ Surface_Modelisation_Plugin::Surface_Modelisation_Plugin() ...@@ -24,6 +24,9 @@ Surface_Modelisation_Plugin::Surface_Modelisation_Plugin()
bool Surface_Modelisation_Plugin::enable() bool Surface_Modelisation_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_Modelisation_DockTab(m_schnapps, this); m_dockTab = new Surface_Modelisation_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Modelisation"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Modelisation");
...@@ -790,11 +793,7 @@ void Surface_Modelisation_Plugin::pathExtrudeFace(MapHandlerGen *mhg) ...@@ -790,11 +793,7 @@ void Surface_Modelisation_Plugin::pathExtrudeFace(MapHandlerGen *mhg)
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_Modelisation_Plugin, Surface_Modelisation_Plugin) Q_EXPORT_PLUGIN2(Surface_Modelisation_Plugin, Surface_Modelisation_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_Modelisation_PluginD, Surface_Modelisation_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -10,6 +10,9 @@ namespace SCHNApps ...@@ -10,6 +10,9 @@ namespace SCHNApps
bool Surface_Render_Plugin::enable() bool Surface_Render_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_Render_DockTab(m_schnapps, this); m_dockTab = new Surface_Render_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Render"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Render");
...@@ -323,11 +326,7 @@ void Surface_Render_Plugin::changeRenderBoundary(const QString& view, const QStr ...@@ -323,11 +326,7 @@ void Surface_Render_Plugin::changeRenderBoundary(const QString& view, const QStr
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_Render_Plugin, Surface_Render_Plugin) Q_EXPORT_PLUGIN2(Surface_Render_Plugin, Surface_Render_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_Render_PluginD, Surface_Render_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -10,6 +10,9 @@ namespace SCHNApps ...@@ -10,6 +10,9 @@ namespace SCHNApps
bool Surface_RenderScalar_Plugin::enable() bool Surface_RenderScalar_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_RenderScalar_DockTab(m_schnapps, this); m_dockTab = new Surface_RenderScalar_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_RenderScalar"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_RenderScalar");
...@@ -255,11 +258,7 @@ void Surface_RenderScalar_Plugin::changeExpansion(const QString& view, const QSt ...@@ -255,11 +258,7 @@ void Surface_RenderScalar_Plugin::changeExpansion(const QString& view, const QSt
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_RenderScalar_Plugin, Surface_RenderScalar_Plugin) Q_EXPORT_PLUGIN2(Surface_RenderScalar_Plugin, Surface_RenderScalar_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_RenderScalar_PluginD, Surface_RenderScalar_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -10,6 +10,9 @@ namespace SCHNApps ...@@ -10,6 +10,9 @@ namespace SCHNApps
bool Surface_RenderTopo_Plugin::enable() bool Surface_RenderTopo_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_RenderTopo_DockTab(m_schnapps, this); m_dockTab = new Surface_RenderTopo_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_RenderTopo"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_RenderTopo");
...@@ -217,11 +220,7 @@ void Surface_RenderTopo_Plugin::attributeAdded(unsigned int orbit, const QString ...@@ -217,11 +220,7 @@ void Surface_RenderTopo_Plugin::attributeAdded(unsigned int orbit, const QString
// } // }
//} //}
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_RenderTopo_Plugin, Surface_RenderTopo_Plugin) Q_EXPORT_PLUGIN2(Surface_RenderTopo_Plugin, Surface_RenderTopo_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_RenderTopo_PluginD, Surface_RenderTopo_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -10,6 +10,9 @@ namespace SCHNApps ...@@ -10,6 +10,9 @@ namespace SCHNApps
bool Surface_RenderVector_Plugin::enable() bool Surface_RenderVector_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_RenderVector_DockTab(m_schnapps, this); m_dockTab = new Surface_RenderVector_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_RenderVector"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_RenderVector");
...@@ -209,11 +212,7 @@ void Surface_RenderVector_Plugin::changeVectorsScaleFactor(const QString& view, ...@@ -209,11 +212,7 @@ void Surface_RenderVector_Plugin::changeVectorsScaleFactor(const QString& view,
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_RenderVector_Plugin, Surface_RenderVector_Plugin) Q_EXPORT_PLUGIN2(Surface_RenderVector_Plugin, Surface_RenderVector_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_RenderVector_PluginD, Surface_RenderVector_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -23,6 +23,9 @@ Surface_Selection_Plugin::Surface_Selection_Plugin() : ...@@ -23,6 +23,9 @@ Surface_Selection_Plugin::Surface_Selection_Plugin() :
bool Surface_Selection_Plugin::enable() bool Surface_Selection_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_Selection_DockTab(m_schnapps, this); m_dockTab = new Surface_Selection_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Selection"); m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Selection");
...@@ -625,11 +628,7 @@ void Surface_Selection_Plugin::changeSelectionMethod(const QString& map, unsigne ...@@ -625,11 +628,7 @@ void Surface_Selection_Plugin::changeSelectionMethod(const QString& map, unsigne
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_Selection_Plugin, Surface_Selection_Plugin) Q_EXPORT_PLUGIN2(Surface_Selection_Plugin, Surface_Selection_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_Selection_PluginD, Surface_Selection_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -12,6 +12,9 @@ namespace SCHNApps ...@@ -12,6 +12,9 @@ namespace SCHNApps
bool Surface_Subdivision_Plugin::enable() bool Surface_Subdivision_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_subdivisionDialog = new Dialog_Surface_Subdivision(m_schnapps); m_subdivisionDialog = new Dialog_Surface_Subdivision(m_schnapps);
m_subdivisionAction = new QAction("Subdivide surface", this); m_subdivisionAction = new QAction("Subdivide surface", this);
...@@ -122,11 +125,7 @@ void Surface_Subdivision_Plugin::trianguleFaces( ...@@ -122,11 +125,7 @@ void Surface_Subdivision_Plugin::trianguleFaces(
view->updateGL(); view->updateGL();
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Surface_Subdivision_Plugin, Surface_Subdivision_Plugin) Q_EXPORT_PLUGIN2(Surface_Subdivision_Plugin, Surface_Subdivision_Plugin)
#else
Q_EXPORT_PLUGIN2(Surface_Subdivision_PluginD, Surface_Subdivision_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -16,7 +16,12 @@ class Volume_Import_Plugin : public PluginProcessing ...@@ -16,7 +16,12 @@ class Volume_Import_Plugin : public PluginProcessing
public: public:
Volume_Import_Plugin() Volume_Import_Plugin()
{} {
std::cout << "VOL IMPORT CONSTR" << std::endl;
std::cout << "&PTR="<< &(GenericMap::s_instances)<< std::endl;
std::cout << "PTR="<< GenericMap::s_instances<< std::endl;
}
~Volume_Import_Plugin() ~Volume_Import_Plugin()
{} {}
......
...@@ -16,6 +16,9 @@ namespace SCHNApps ...@@ -16,6 +16,9 @@ namespace SCHNApps
bool Volume_Import_Plugin::enable() bool Volume_Import_Plugin::enable()
{ {
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
importAction = new QAction("import", this); importAction = new QAction("import", this);
m_schnapps->addMenuAction(this, "Volume;Import", importAction); m_schnapps->addMenuAction(this, "Volume;Import", importAction);
connect(importAction, SIGNAL(triggered()), this, SLOT(importFromFileDialog())); connect(importAction, SIGNAL(triggered()), this, SLOT(importFromFileDialog()));
...@@ -62,11 +65,7 @@ void Volume_Import_Plugin::importFromFileDialog() ...@@ -62,11 +65,7 @@ void Volume_Import_Plugin::importFromFileDialog()
} }
} }
#ifndef DEBUG
Q_EXPORT_PLUGIN2(Volume_Import_Plugin, Volume_Import_Plugin) Q_EXPORT_PLUGIN2(Volume_Import_Plugin, Volume_Import_Plugin)
#else
Q_EXPORT_PLUGIN2(Volume_Import_PluginD, Volume_Import_Plugin)
#endif
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -101,6 +101,8 @@ public slots: ...@@ -101,6 +101,8 @@ public slots:
void notifySelectedCellSelectorChanged(CellSelectorGen* cs) { emit(selectedCellSelectorChanged(cs)); } void notifySelectedCellSelectorChanged(CellSelectorGen* cs) { emit(selectedCellSelectorChanged(cs)); }
CellSelectorGen* getSelectedSelector(unsigned int orbit) const; CellSelectorGen* getSelectedSelector(unsigned int orbit) const;
const StaticPointers& getStaticPointers() const {return m_sp;}
/********************************************************* /*********************************************************
* MANAGE TEXTURES * MANAGE TEXTURES
*********************************************************/ *********************************************************/
...@@ -180,6 +182,8 @@ protected: ...@@ -180,6 +182,8 @@ protected:
MapSet m_maps; MapSet m_maps;
TextureSet m_textures; TextureSet m_textures;
StaticPointers m_sp;
}; };
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "plugin_processing.h" #include "plugin_processing.h"
#include "plugins_default_directory.h" #include "plugins_default_directory.h"
#include "Topology/generic/genericmap.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -41,6 +42,8 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt ...@@ -41,6 +42,8 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
m_firstView(NULL), m_firstView(NULL),
m_selectedView(NULL) m_selectedView(NULL)
{ {
GenericMap::initAllStatics(&m_sp);
this->setupUi(this); this->setupUi(this);
// create & setup control dock // create & setup control dock
......
...@@ -69,6 +69,17 @@ inline int getSystemNumberOfCores(bool hyperthreading=false) ...@@ -69,6 +69,17 @@ inline int getSystemNumberOfCores(bool hyperthreading=false)
} }
// forward
class GenericMap;
// classs that store static pointer for copy in schnapps plugins
struct StaticPointers
{
std::map<std::string, RegisteredBaseAttribute*>* att_registry;
std::vector<GenericMap*>* instances;
std::vector< std::vector<Dart>* >* vdartsBuffers;
std::vector< std::vector<unsigned int>* >* vintsBuffers;
};
class AttributeHandlerGen ; class AttributeHandlerGen ;
class DartMarkerGen ; class DartMarkerGen ;
...@@ -117,16 +128,15 @@ protected: ...@@ -117,16 +128,15 @@ protected:
AttributeContainer m_attribs[NB_ORBITS] ; AttributeContainer m_attribs[NB_ORBITS] ;
static std::map<std::string, RegisteredBaseAttribute*>* m_attributes_registry_map; static std::map<std::string, RegisteredBaseAttribute*>* m_attributes_registry_map;
static int m_nbInstances;
/// buffer for less memory allocation /// buffer for less memory allocation
static std::vector< std::vector<Dart>* >* s_vdartsBuffers; static std::vector< std::vector<Dart>* >* s_vdartsBuffers;
static std::vector< std::vector<unsigned int>* >* s_vintsBuffers; static std::vector< std::vector<unsigned int>* >* s_vintsBuffers;
public:
/// table of instancied maps for Dart/CellMarker release /// table of instancied maps for Dart/CellMarker release
static std::vector<GenericMap*>* s_instances; static std::vector<GenericMap*>* s_instances;
protected:
/** /**
* Direct access to the Dart attributes that store the orbits embeddings * Direct access to the Dart attributes that store the orbits embeddings
...@@ -161,6 +171,12 @@ protected: ...@@ -161,6 +171,12 @@ protected:
public: public:
static const unsigned int UNKNOWN_ATTRIB = AttributeContainer::UNKNOWN ; static const unsigned int UNKNOWN_ATTRIB = AttributeContainer::UNKNOWN ;
/// copy all static pointers: use in SCHNApps only
static void copyAllStatics(const StaticPointers& sp);
/// init all static and store in sp (if not null) : use in SCHNApps only
static void initAllStatics(StaticPointers* sp);
GenericMap() ; GenericMap() ;
virtual ~GenericMap() ; virtual ~GenericMap() ;
......
...@@ -44,8 +44,6 @@ int NumberOfThreads = getSystemNumberOfCores(); ...@@ -44,8 +44,6 @@ int NumberOfThreads = getSystemNumberOfCores();
std::map<std::string, RegisteredBaseAttribute*>* GenericMap::m_attributes_registry_map = NULL; std::map<std::string, RegisteredBaseAttribute*>* GenericMap::m_attributes_registry_map = NULL;
int GenericMap::m_nbInstances = 0;
std::vector< std::vector<Dart>* >* GenericMap::s_vdartsBuffers = NULL; std::vector< std::vector<Dart>* >* GenericMap::s_vdartsBuffers = NULL;
std::vector< std::vector<unsigned int>* >* GenericMap::s_vintsBuffers = NULL; std::vector< std::vector<unsigned int>* >* GenericMap::s_vintsBuffers = NULL;
...@@ -55,11 +53,36 @@ std::vector< std::vector<unsigned int>* >* GenericMap::s_vintsBuffers = NULL; ...@@ -55,11 +53,36 @@ std::vector< std::vector<unsigned int>* >* GenericMap::s_vintsBuffers = NULL;
std::vector<GenericMap*>* GenericMap::s_instances=NULL; std::vector<GenericMap*>* GenericMap::s_instances=NULL;
GenericMap::GenericMap(): GenericMap::GenericMap():
m_nextMarkerId(0), m_nextMarkerId(0),
m_manipulator(NULL) m_manipulator(NULL)
{
if(m_attributes_registry_map == NULL)
initAllStatics(NULL); // no need here to store the pointers
s_instances->push_back(this);
m_thread_ids.reserve(NB_THREAD+1);
m_thread_ids.push_back( std::this_thread::get_id() );
for(unsigned int i = 0; i < NB_ORBITS; ++i)
{
m_attribs[i].setOrbit(i) ;
m_attribs[i].setRegistry(m_attributes_registry_map) ;
}
init();
}
void GenericMap::copyAllStatics(const StaticPointers& sp)
{
m_attributes_registry_map = sp.att_registry;
s_instances = sp.instances;
s_vdartsBuffers = sp.vdartsBuffers;
s_vintsBuffers = sp.vintsBuffers;
}
void GenericMap::initAllStatics(StaticPointers* sp)
{ {
if(m_attributes_registry_map == NULL) if(m_attributes_registry_map == NULL)
{ {
...@@ -99,18 +122,9 @@ GenericMap::GenericMap(): ...@@ -99,18 +122,9 @@ GenericMap::GenericMap():
registerAttribute<MarkerBool>("MarkerBool"); registerAttribute<MarkerBool>("MarkerBool");
} }
m_nbInstances++;
if (s_instances==NULL) if (s_instances==NULL)
s_instances= new std::vector<GenericMap*>; s_instances= new std::vector<GenericMap*>;
s_instances->push_back(this);
m_thread_ids.reserve(NB_THREAD+1);
m_thread_ids.push_back( std::this_thread::get_id() );
if (s_vdartsBuffers == NULL) if (s_vdartsBuffers == NULL)
{ {
s_vdartsBuffers = new std::vector< std::vector<Dart>* >[NB_THREAD]; s_vdartsBuffers = new std::vector< std::vector<Dart>* >[NB_THREAD];
...@@ -123,15 +137,13 @@ GenericMap::GenericMap(): ...@@ -123,15 +137,13 @@ GenericMap::GenericMap():
// prealloc ? // prealloc ?
} }
} }
if (sp != NULL)