dotnet/winforms

Clarification about System.Drawing.Font and Dispose

Open

#8,823 opened on 2020年5月10日

GitHub で見る
 (12 comments) (0 reactions) (0 assignees)C# (922 forks)batch import
area-System.Drawinghelp wanted

Repository metrics

Stars
 (4,100 stars)
PR merge metrics
 (平均マージ 14d 22h) (30d で 56 merged PRs)

説明

  • 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.

コントリビューターガイド