alright I'm not getting anywhere. Heres the offending code, for some reason when it hits the return it takes about twice as long as the previous time to execute. I don't think it is a memory leak as this code and the function that calls it aren't concerned with memory allocation (but what do I know)
std::vector<std::vector<Segment> > Environment::_AIScopeSubArray(int yPos, int xPos, int AIScope)
{
std::vector<std::vector<Segment> > subScope;
int scopeRad = AIScope/2;