dotnet/winforms

Clarification about System.Drawing.Font and Dispose

开放

#8,823 创建于 2020年5月10日

 (12 条评论) (0 个反应) (0 位负责人)C# (922 个派生)batch import
area-System.Drawinghelp wanted

仓库指标

星标
 (4,100 个星标)
PR 合并指标
 (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.

贡献者指南