Memory leakage when the ArcEngine program is disabled

Source: Internet
Author: User
Memory leakage when the ArcEngine program is disabled
Author: GIS Power Station Source: GIS Power Station
I. Solutions in AE9.0 and 9.1
In AE9.0 and 9.1, the memory leakage occurs when the ArcEngine Development Program is closed. An error is prompted, which is quite unpleasant. later, you need to add a function when you close the form.

Private void frmMain_Closing (object sender, System. ComponentModel. CancelEventArgs e)
{
ESRI. ArcGIS. Utility. COMSupport. AOUninitialize. Shutdown ();

}

2. Solutions in AE9.2

Later I heard that in the AE9.1 patch, there is no need to add such a sentence.

If AE9.2 is used these days, ESRI seems to have not solved this problem. I still use the above statement and compiled it, but I found a warning that the above method is outdated. Changed the class library as prompted.

Private void form=formclosing (object sender, FormClosingEventArgs e)
{
ESRI. ArcGIS. ADF. COMSupport. AOUninitialize. Shutdown ();

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.