In planner.cpp, we allocate memory for binMap and never release it. This is then passed to voronoiDiagram.initializeMap() function, which assigns it to the gridMap member variable.
In the subsequent calls to the function, we just assign this binMap or _gridMap parameter to the member variable gridMap, without releasing the existing gridMap memory. This results in memory leak.
In planner.cpp, we allocate memory for binMap and never release it. This is then passed to voronoiDiagram.initializeMap() function, which assigns it to the gridMap member variable.
In the subsequent calls to the function, we just assign this binMap or _gridMap parameter to the member variable gridMap, without releasing the existing gridMap memory. This results in memory leak.