.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
Post a Comment