xoft you proposed API would have issues and I think the pathfinder will need to create a new path object each time. The problem is that if you have a zombie pathing to a player from a distance, then you want to be continually recaclulating the path. But you want to continue along the old path until the new one is finished, or else you get weird pauses. So the old path can not be deleted until the new one is ready. So using an internal path object is problematic.
Also if we transfer ownership to the client code it is simpler to manage. C++ clients can just use RAII, and lua can use the GC.
Also if we transfer ownership to the client code it is simpler to manage. C++ clients can just use RAII, and lua can use the GC.