Hi,
Does the code in my post work?
When we define a class with unmanaged resources , we need to release it in our code, since CLR normallydoes not release it.
So we can release these unmanaged resources in finalizer method. however, it will take long time to release it ( You might want to take a look at some artical about generationof GC) . We can make up adispose method to doreleasingwork , it can be called by users when theydon't need the object that references unmanaged resourcesto reduce the timeto release object .
If you are not familiar with the concept , you might need to create a new thread about specific quesiton.
Harry
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.