Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top