The variable seers is allocated in this call to CanSeeSteal (new AList) in line 322:
AList *seers = CanSeeSteal(r, u);
This list is never deleted anywhere later in the function, which has multiple return paths (I believe this is the kind of thing std::auto_ptr<> is good for).
The variable
seers
is allocated in this call to CanSeeSteal (new AList) in line 322:This list is never deleted anywhere later in the function, which has multiple return paths (I believe this is the kind of thing std::auto_ptr<> is good for).