Will myStrip.DropDownItems.Clear() remove also SubItems?

mystrip
   - Item1
        - SubItem1
             - AnotherSubItem1
   - Item2

After Clear() method

will it be just:

mystrip

or

mystrip
   - NOTHING HERE
        - SubItem1
              - AnotherSubItem1

Thanks for respond.

有帮助吗?

解决方案

the objects will not be destroyed or disposed, but you cannot access them any more by the DropDrownItems list. so if you have no reference anywhere else to the items, the garbage collection will take care about it

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top