dotnet/winforms

Clarification about System.Drawing.Font and Dispose

Open

#8,823 建立於 2020年5月10日

在 GitHub 查看
 (12 留言) (0 反應) (0 負責人)C# (922 fork)batch import
area-System.Drawinghelp wanted

倉庫指標

Star
 (4,100 star)
PR 合併指標
 (平均合併 14天 22小時) (30 天內合併 56 個 PR)

描述

  • Docs says nothing unusual here:

Call Dispose when you are finished using the Font. The Dispose method leaves the Font in an unusable state. After calling Dispose, you must release all references to the Font so the garbage collector can reclaim the memory that the Font was occupying.

If nothing special here (docs are correct), why Designer never call Font.Dispose then? Otherwise, can we have official clarification (update docs)?

Ups, sorry about api-suggestion label - my bad :( Pls remove it.

貢獻者指南