>>>P.S. -- this will end up being only a few lines of code anyway. You need help fleshing them out?
>>
>>
>>As I suspected, there's the "few lines of code" approach, and then there's the NASA aprroach per Christof's message #
1420860.
>>
>>So, sure, I'd love to see your few lines solution. It sure seems like a good little method to have on your base form class for a quick way to clean things up.
>>
>>Otherwise, I'll just hard-code the 3 properties that I know need to be released.
>
>Make a mental note to just add the fourth there too, when you have it. Once that becomes a habit, it's easy :).
Yes, Yes. I know... I have far too many of these habits under my belt already!
But, nope! Not this time. Thankfully, I will *NOT* hard-code *THIS* one, because my good friend Jim Nelson banged me out a very nice method to handle exactly what is called for, which I now share with all of UT and the rest of the VFP world (with his permission):
Lparameters toObject
Local laMembers[1], lcMember, lnI
AMembers(laMembers, toObject, 1, 'PHG#')
With toObject
For lnI = 1 to Alen(laMembers, 1)
lcMember = laMembers(lnI, 1)
If 'O' = Left(lcMember,1);
and laMembers(lnI,2) = 'Property' ;
and not 'N' $ laMembers(lnI,3) ;
and 'O' = Type ("." + lcMember)
Try
.&lcMember. = .Null.
Catch
EndTry
endif
endfor
endwith
.