.net - Do I need to call GC.KeepAlive(this) in my Dispose method? -


@Jen Skeet This right is referred to by Chris Broumema

I was thinking, Code> gc Complimentary with this code with GC.ipaliev (this) , all calls are required to be followed. In race conditions where a display is the last in the running time in highly multi-threaded applications Can be implemented by the form?

If so, can you come up with a sample program that exposes this bug?

not gc Keep Alive really does nothing; Its purpose prevents the introduction of the method and the call between gc.caplive to a specific object.

Call any method to keep an object alive like this: You can send it to console. Written , call tostring , or even ... fully customize GC.Press .

(or as MSDN says this:

The KeepAlive method does not work and except for extending the life of the object passed as a parameter, no side Does not produce an effect.)


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -