Commit e4f9959b authored by Mohcine Chraibi's avatar Mohcine Chraibi

Use smartpointer

parent 56df71d4
......@@ -88,7 +88,7 @@ Building::Building(const Configuration* configuration, PedDistributor& pedDistri
else
#endif
{
parser = new GeoFileParser(_configuration);
parser = new GeoFileParser(_configuration); // Memory Leak
}
parser->LoadBuilding(this);
......
......@@ -15,7 +15,7 @@
</trajectories>
<!-- where to store the logs -->
<logfile>log</logfile>
<num_threads>12</num_threads>
<num_threads>1</num_threads>
<!-- traffic information: e.g closed doors or smoked rooms -->
<traffic_constraints>
<!-- room states are: good or smoked -->
......@@ -47,7 +47,7 @@
<!--persons information and distribution -->
<agents operational_model_id="3">
<agents_distribution>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="2" number="37" goal_id="0" router_id="1" />
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="2" number="2" goal_id="0" router_id="1" />
</agents_distribution>
<!-- frequency in persons/minute -->
......
......@@ -53,7 +53,8 @@ int main(int argc, char** argv)
// Parsing the arguments
bool status = false;
{
ArgumentParser* p = new ArgumentParser(configuration);
//ArgumentParser* p = new ArgumentParser(configuration); //Memory Leak
std::unique_ptr<ArgumentParser> p(new ArgumentParser(configuration));
status = p->ParseArgs(argc, argv);
}
#ifdef _JPS_AS_A_SERVICE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment