Does calling Clear disposes the items also?

前端 未结 4 1592
予麋鹿
予麋鹿 2021-01-07 19:54

Many times there is a clear method, that removes all the items from the collections, are these items disposed also.

Like,

toolStripMenuItem.DropDown         


        
4条回答
  •  隐瞒了意图╮
    2021-01-07 20:41

    You should rely on Dispose() call when you're dealing with unmanaged memory, shared resources or large memory areas. Doesn't seems this case.

提交回复
热议问题