Arcengine空间查询遍历的时候报错内存不足

IMap pMap = axMapControl1.Map;
IEnvelope pEnvelope = new EnvelopeClass();
IFeatureLayer pFeatureLayer = pMap.get_Layer(0) as IFeatureLayer; //融合
IFeatureCursor pFC;
IQueryFilter PQF = new QueryFilter();
IIdentify pIdentify = (IIdentify)pMap.get_Layer(0);
double RiverMinDistance;
double max = 0.0;
for (double j = 33926.47; j > 33743.24; j--)
{
for (double i = 202352.30; i < 202524.23; i++)
{
RiverMinDistance = 999999.9;
pEnvelope.PutCoords(i * 100, j * 100, i * 100 + 0.001, j * 100 + 0.001);
IArray pArray = pIdentify.Identify((IGeometry)pEnvelope);
PQF.WhereClause = "当前类型 = " + "7";

IFeatureIdentifyObj pIdentifyObj = pArray.get_Element(0) as IFeatureIdentifyObj;
IRowIdentifyObject pRFO = pIdentifyObj as IRowIdentifyObject;
IFeature pFeature = pRFO.Row as IFeature;
pFC = pFeatureLayer.Search(PQF, false);
IFeature IF = pFC.NextFeature();
while (IF != null)
{
IPolygon PPolygon = (IPolygon)IF.Shape;
IProximityOperator prox = (IProximityOperator)PPolygon;

if (prox.ReturnDistance(pFeature.Shape) < RiverMinDistance)
{
RiverMinDistance = prox.ReturnDistance(pFeature.Shape);
}

IF = pFC.NextFeature();
}
IF = null; }}
代码如上在查询的过程中提示我空间不足 而且在查看ifeaturecursor的属性时,警告说“由于以前的函数求值超时,函数求值被禁用。”这是什么情况?我需要查询的要素总共也就十几个 但是整个查询是在两个循环嵌套里面的 是不是这个出了问题?
游标用完了释放下试试
兄弟,我也遇到了同样的问题,请问现在这个问题你解决了吗