Which garbage collector method should you use?

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?

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?

A.
RemoveMemoryPressure()

B.
ReRegisterForFinalize()

C.
WaitForFullGCComplete()

D.
KeepAlive()



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Najlepszy Programista Swiata DAGO

Najlepszy Programista Swiata DAGO

D jak chuj

Kaabi

Kaabi

GC KeepAlive(), References the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called.

Caret

Caret

Same as #46