资源释放问题
net吧
全部回复
仅看楼主
level 1
public class Common
{
public static bool IsExistKxNo(string iType, string kno)
{
bool result=false;
string sql = string.Empty;
DataSet ds = GlobalClass.GetKxDS();
if (iType.ToUpper() == "G")
sql = "ktype=0 and kno=" + kno;
else
sql = "ktype=1 and kno=" + kno;
DataRow[] drs = ds.Tables[0].Select(sql);
if(drs.Length>0)
result=true;
return result;
}
}
中的ds和drs是不是每次调用都会占用新的内存?上一次的内存会释放吗?
2016年01月15日 06点01分 1
1