>>Hi everybody,
>>
>>If I'm creating an object as my form's property such as oBill, for example, I always start it with an 'o'. I'm thinking, is it possible to make a generic Destroy method to SET such objects to NULL instead of making changes to each form class where I'm creating such properties.
>>
>>I guess I can loop through aMembers for the form, check the first letter, etc.
>
>You could also check
all properties, if they are of type "O".
>
>>Do you think it's worth the trouble to make a generic Destroy method or it's better to continue the current practice of modifying each individual form's Destroy method?
>
>As to this desirability, I am not quite sure. But do consider that anything you do at the root of the hierarchy of form classes, you will have to do only once. And, it might help you have less hard-to-find bugs, in this case, a form not releasing, 'cause you forgot to destroy some individual object.
Thanks, Hilmar. It is not my application and I haven't checked every form if the references are currently cleared. If I'd found they are not, I'll made this method to be generic.
If it's not broken, fix it until it is.
My Blog