c# - The cost of finalize in .Net -


(1) I have read a lot of questions about IDisposable where the answer is not to use the answer ultimately when As long as you do not really need the process time involved.
What I have not seen is that how much is the cost and how often it is paid. Every millisecond? second? Hours, days etc. Besides, it seems to me that it is easy to finalize, when it is not always known that an object can be disposed of, for example, framework font class. A control can not be settled because it does not know that the font has been shared. The font is usually made at design time so that the user does not know how to handle it, so in order to finally get rid of it, the kick is finalized when no reference is left, is this the right impression? Finally the main problem is that it prevents an object from collecting garbage.

Instead, it is called final, and the object is collected on "next run". OK, technically IIRC finally runs a list of objects in a separate thread. Either way, this is not an "every MS" issue, and is necessary to get rid of more than one GC run object.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -