public void HalconDispose() { try { HOperatorSet.CloseAllFiles(); } catch { } try { HOperatorSet.ClearAllDataCode2dModels(); } catch { } }
public void releaseMemory() { //try { HOperatorSet.CloseAllBgEsti(); } //catch { } //try { HOperatorSet.CloseAllClassBox(); } //catch { } try { HOperatorSet.CloseAllFiles(); } catch (Exception e) { string str = "清理HALCON内存(HOperatorSet.CloseAllFiles)过程出错; \r\n" + e.ToString(); logWR.appendNewLogMessage(str); } //try { HOperatorSet.CloseAllFramegrabbers(); } //catch { } ////try { HOperatorSet.CloseAllMeasures(); } ////catch { } ////try { HOperatorSet.CloseAllOcrs(); } ////catch { } ////try { HOperatorSet.CloseAllOcvs(); } ////catch { } ////try { HOperatorSet.CloseAllSerials(); } ////catch { } ////try { HOperatorSet.ReleaseAllComputeDevices(); } ////catch { } //try { HOperatorSet.ClearAllBarCodeModels(); } //catch { } //try { HOperatorSet.ClearAllBarriers(); } //catch { } //try { HOperatorSet.ClearAllCalibData(); } //catch { } ////try { HOperatorSet.ClearAllCameraSetupModels(); } ////catch { } //try { HOperatorSet.ClearAllClassGmm(); } //catch { } //try { HOperatorSet.ClearAllClassLut(); } //catch { } //try { HOperatorSet.ClearAllClassMlp(); } //catch { } ////try { HOperatorSet.ClearAllClassSvm(); } ////catch { } ////try { HOperatorSet.ClearAllColorTransLuts(); } ////catch { } try { HOperatorSet.ClearAllComponentModels(); } catch (Exception e) { string str = "清理HALCON内存(HOperatorSet.ClearAllComponentModels)过程出错; \r\n" + e.ToString(); logWR.appendNewLogMessage(str); } //try { HOperatorSet.ClearAllConditions(); } //catch { } try { HOperatorSet.ClearAllDataCode2dModels(); } catch (Exception e) { string str = "清理HALCON内存(HOperatorSet.ClearAllDataCode2dModels)过程出错; \r\n" + e.ToString(); logWR.appendNewLogMessage(str); } ////try { HOperatorSet.ClearAllDeformableModels(); } ////catch { } ////try { HOperatorSet.ClearAllDescriptorModels(); } ////catch { } }