<html><head></head><body><div>Hi,</div><div><br></div><blockquote type="cite"><div dir="ltr"><div>Graph::ArcMap<IloRange> capacityConstraints(network, * new IloRange(env, 0 , 0));</div></div></blockquote><div><br></div><div>This line certainly looks quite badly. You allocate a temporary object 'IloRange' with 'new', but you do not 'delete' it.</div><div><br></div><div>Then and initialize the ArcMap by copying the temporary object for each existing Arcs, this may or may not be what you want.</div><div><br></div><blockquote type="cite"><div dir="ltr"><div>According to this post: <a href="http://lemon.cs.elte.hu/pipermail/lemon-user/2013-March/000682.html">http://lemon.cs.elte.hu/pipermail/lemon-user/2013-March/000682.html</a> , I was expecting that all the variables created within the function should be cleared up when exiting the function. But this is not the case.</div></div></blockquote><div><br></div><div>You rightly expected - all the local variables are cleaned up on exit. But the ones you allocated by 'new' are not local variables.</div><div>This is not LEMON specific, but how C++ works in general.</div><div><br></div><div><div>Regards,</div><div>Alpár</div><div><br></div><blockquote type="cite"><div dir="ltr"></div></blockquote></div><blockquote type="cite"><div dir="ltr"><div></div></div></blockquote><div>
</div></body></html>