문제

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