开发者

Should a control properly remove from parent object before disposing?

开发者 https://www.devze.com 2023-03-24 22:35 出处:网络
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

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消