Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top