ApplicationProgramI like to use resources on my computer, rather than considering whether the resources they use are database connections or data in the memory as a stack or array.
You can use these resources when necessary, but release them
Understanding of managed and unmanaged resources, hosting of managed resources
In the. net programming environment, system resources are divided into managed resources and unmanaged resources.
For the collection of managed resources, manual
To use an unmanaged resource type, you must implement the idisposable interface's dispose () method to precisely release system resources .. This rule in the. NET environment causes the release of resources.Source codeIs a type of user, rather than
Recovery of. net unmanaged resources and recovery of. net managed resources
There are two ways to release unmanaged Resources
1. destructor
2. Implement the System. IDisposable Interface
I. destructor
The constructor can specify certain
C #14 days of advanced programming ---- release of unmanaged resources,
Release unmanaged Resources
When introducing the release of unmanaged resources, I think it is necessary to first understand what it is called an unmanaged resource. Since there
Recovery of. net unmanaged resources and recovery of. net managed resources
There are two ways to release unmanaged Resources
1. destructor
2. Implement the System. IDisposable Interface
I. destructor
The constructor can specify certain
About the recycling of unmanaged resources and about the recycling of managed resources
There are two ways to release unmanaged Resources
1. destructor
2. Implement the System. IDisposable Interface
I. destructor
The constructor can specify
The project needs to be changed and the UI needs to be adjusted. The result is that a bunch of junk Resources in the project that are not used but are not cleaned up, not to mention the project size, for new project users or those who read code from
Releasing unmanaged ResourcesWhen it comes to releasing unmanaged resources, I think it is necessary to first meet the unmanaged resources, since there are unmanaged resources, there must be managed resources.Managed resources refer to the resources
We know that one of the things that we often need to use when writing Java code is the dialog box (Dialog), for example, we write the program, others in use, we need to give users some hints, and these tips if always in the form of the window to
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.