lannyboy
lannyboy

Reputation: 459

Should a control properly remove from parent object before disposing?

Well, should I properly remove any control from the parent object before it is set to dispose? Will this cause memory leak to the parent object if it is disposed before removing it from parent?

Upvotes: 0

Views: 122

Answers (1)

alun
alun

Reputation: 3441

Disposing is all about releasing unmanaged resources while removing a reference will only ever effect the garbage collector which only deals with managed memory so no, you will not cause a memory leak in the way you are describing.

Upvotes: 2

Related Questions