Use signed ints for clear_objects and _regions to avoid deleting nonexistent objects.