Page 1 of 1


PostPosted: Sat Jan 22, 2011 5:22 am
by sparky2708
Can someone please explain how PropertyStore works in the context of MDIChild. When I run memprofiler I see my form stuck in propertyStore.objEntries[]. Why does my form have a reference from that array? What happens if I set an MDIParent on a child to some MDIParent and then set child.MDIParent = Nothing. What happens to PropertyStore?

Re: ProperyStore

PostPosted: Tue Jan 25, 2011 8:24 pm
by Andreas Suurkuusk
The PropertyStore is used to efficiently store seldom assigned properties in instances of System.Windows.Forms.Control. If you set the MdiParent property in an MDI child form, a reference to the parent form will be stored in the PropertyStore. If you set the MdiParent property to null (or Nothing), then the reference will be removed from the PropertyStore.

Unfortunately it is not easy to find out which property an entry in the PropertyStore represents. However, in .NET Memory Profiler 4.0, we will try to identify PropertyStore entries and present them as pseudo-properties, similar to how DependencyProperties are presented in the current preview.