Win7 VS2002 halcon12, 直接运行Debug的exe
private void butTemp_Click(object sender, EventArgs e)
{
butTemp.Enabled = false;
HOperatorSet.SetSystem("clip_region", "false");
{
HObject region;
HOperatorSet.GenCheckerRegion(out region, 5000, 5000, 1, 1);
HObject regionConnect;
HOperatorSet.Connection(region, out regionConnect);
region.Dispose();
regionConnect.Dispose();
}
butTemp.Enabled = true;
}
大约占用200M,两者的顺序不影响结果。
private void butTemp_Click(object sender, EventArgs e)
{
butTemp.Enabled = false;
HOperatorSet.SetSystem("clip_region", "false");
{
HObject region;
HOperatorSet.GenCheckerRegion(out region, 5000, 5000, 1, 1);
HObject regionConnect;
HOperatorSet.Connection(region, out regionConnect);
//region.Dispose();
//regionConnect.Dispose();
}
butTemp.Enabled = true;
}
大约占350M
private void butTemp_Click(object sender, EventArgs e)
{
butTemp.Enabled = false;
HOperatorSet.SetSystem("clip_region", "false");
{
HObject region;
HOperatorSet.GenCheckerRegion(out region, 5000, 5000, 1, 1);
HObject regionConnect;
HOperatorSet.Connection(region, out regionConnect);
region.Dispose();
//regionConnect.Dispose();
}
butTemp.Enabled = true;
}
大约占用200M
private void butTemp_Click(object sender, EventArgs e)
{
butTemp.Enabled = false;
HOperatorSet.SetSystem("clip_region", "false");
{
HObject region;
HOperatorSet.GenCheckerRegion(out region, 5000, 5000, 1, 1);
HObject regionConnect;
HOperatorSet.Connection(region, out regionConnect);
// region.Dispose();
regionConnect.Dispose();
}
大约占用200M
换了halcol18 halcon12的 debug release都如此。
先释放regionConnect和先释放region 都如此。