>The objects that create such references should clean up after themselves in Destroy. Otherwise those objects cannot be released and form cannot be released as well.
>
> Thisform.oGrid = NULL
>
>>I have a form in which I have saved references to some of the objects in the form -- the Init for these objects look like:
>>
>> Thisform.oGrid = This
>>
>>This allows me to reference the grid without knowing its full containership.
>>
>>So, my question is this: when the form is closing, there are all these references to objects contained in ThisForm. Do I need to clean them up, or is this not a problem?
>>
>>Thanks in advance.
I have a property on my form, which is an Object that has other Object properties on it. So, I'm wondering if I could create a generic methdod that would basically scan the entire passed-in object and set every property that begings with the letter 'o' to null.
Something like this:
Procedure Form.Destroy()
this.DestroyObectRefProperties(this.oSomeObject)
EndProc
Some psuedo code here...
Procedure DestroyObjectRefProperties(toObject)
for each property on toObject
if property.name begins with 'o'
property = .null.
endif
endfor
EndProc
So, how can you scan the over the properties like above, without having to know the property names?