070-559 Free Dumps Study Materials
Question 7: You work as the developer in an IT company. Recently your company has a big client. The client
runs a large supermarket chain. According to the business requirement, the client needs a class which
uses unmanaged resources. This class maintains references to managed resources on other objects.
You must make sure that when the class instance is not needed, users of this class can explicitly
release resources. What should you do? (choose more than one)
A. You should make the class implement the IDisposable interface by defining it.
B. You should make the class inherit from the WeakReference class by defining it.
C. You should create a class destructor. The class destructor releases the unmanaged resources.
D. You should create a class destructor. The class destructor releases the managed resources by
calling methods on other objects.
E. You should create a Dispose method. The method forces garbage collection by calling
System.GC.Collect.
F. Create a Dispose method that releases unmanaged resources and calls methods on other objects
to release the managed resources.
Correct Answer: A,C,F