I am not familiar with the AI code, but I think there is no need for heap allocation (i.e. using the operator new). It should be enough to allocate 'path' on the stack like so:
Path path; That way it will be destroyed automatically once it goes out of scope. -- https://code.launchpad.net/~widelands-dev/widelands/ai_coverity/+merge/294132 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai_coverity into lp:widelands. _______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp