There are different points here:
- How many boxes are you using (check that you don’t have a bug that add more boxes than the necessaries. This could cause this memory leak).
- You don’t need to use all this mathematic operations if they are rectangles (see code below).
- Why the loop starts with the 1 instead of the 0?
The first one is the onethat could really create a big trouble.
The (pseudo)code that i was talking (seems bigger but the most part of the operations are using booleans what’s faster):
public function colliding(box1x:Number, box1y:Number, box1Width:Number, box1Height:Number, box2x:Number, box2y:Number, box2Width:Number, box2Height:Number):Boolean
{
   var box1X2:Number = box1X + box1Width;
   var box1Y2:Number = box1Y + box1Height;
   var box2X2:Number = box2X + box2Width;
   var box2Y2:Number = box2Y + box2Height;
  Â
   return ((box1X > box2X && box1X < box2X2) || (box1X2 > box2X && box1X2 < box2X2))  &&  ((box1Y > box2Y && box1Y < box2Y2)||(box1Y2 > box2Y && box1Y2 < box2Y2));
}
If you’re using Rectangles:
public function colliding(box1:Rectangle, box2:Rectangle):Boolean
{
   var box1X2:Number = box1.x + box1.width;
   var box1Y2:Number = box1.y + box1.height;
   var box2X2:Number = box2.x + box2.width;
   var box2Y2:Number = box2.y + box2.height;
  Â
   return ((box1.x > box2.x && box1.x < box2X2) || (box1X2 > box2.x && box1X2 < box2X2))  &&  ((box1.y > box2.y && box1.y < box2Y2)||(box1Y2 > box2.y && box1Y2 < box2Y2));
}
PD: Could be great to be able to have a look at the full project. Maybe the problem is not in this segment of code.