Exam 70-483 Topic 8 Question 140 Discussion

Actual exam question for Microsoft's 70-483 exam
Question #: 140
Topic #: 8
You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until the process completes.
Which garbage collector method should you use?

Suggested Answer: D Vote an answer

The purpose of the KeepAlive method is to ensure the existence of a reference to an object that is at risk of being prematurely reclaimed by the garbage collector.
Reference:
https://msdn.microsoft.com/en-us/library/system.gc.keepalive(v=vs.110).aspx

by Monroe at Feb 25, 2024, 01:13 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10