>>>>> >>>>>I added a method to my baseform named CLEAROBJECTS and pasted the >>>>>CLEAROBJECTS PROCEDURE there. If this is not where it goes, would you >>>>>post back. >>>>>My initial experimentation with this code works fine with no problems. >>>>> >>>>>Thanks Again. You just saved me serveral days of work. >>>>>-- >>>>>Brett Slattery >>>>>Slattery@ewol.com >>>>> >>>>> >>>>>Nancy Folsom <abqnfatdamesdotcom> wrote in article >>>>><OqTotC9k9GA.259@uppssnewspub04.moswest.msn.net>... >>>>>> And, I trust you'll offer me suggestions for improvements? I have to >>>>>say >>>>>> this code was born of desperation. But here it is.. >>>>>> >>>>>> *!* Snippet from Class definition >>>>>> >>>>>> PROCEDURE clearobjects >>>>>> LPARAMETER o_This >>>>>> LOCAL oi >>>>>> DO CASE >>>>>> CASE TYPE( "o_This" ) <> 'O' >>>>>> RETURN .F. >>>>>> *!* CASE PEMSTATUS( o_this, 'controls', 5 ) >>>>>> CASE TYPE( 'o_this.controls') != 'U' >>>>>> FOR EACH oi IN o_this.controls >>>>>> this.ClearObjects( oi ) >>>>>> o_this.removeobject( oi.name ) >>>>>> NEXT >>>>>> *!*CASE PEMSTATUS( o_this, 'pages', 5 ) >>>>>> CASE TYPE( 'o_this.pages') != 'U' >>>>>> FOR EACH oi IN o_this.pages >>>>>> this.ClearObjects( oi ) >>>>>> o_this.removeobject( oi.name ) >>>>>> NEXT >>>>>> ENDCASE >>>>>> RETURN .T. ENDPROC >>>>>> >>>>>> PROCEDURE Unload >>>>>> RELEASE this >>>>>> ENDPROC >>>>>> >>>>>> PROCEDURE Release >>>>>> this.lockscreen = .T. >>>>>> this.ClearObjects( this ) >>>>>> this.lockscreen = .F. >>>>>> RELEASE this >>>>>> ENDPROC >>>>>> >>>>>> *End Snippet >>>>>> >>>>>> A couple of notes. Most important, note the commented PEMSTATUS >>>>>calls. >>>>>> David F. posted recently that this function can leave lingering >>>>>object >>>>>> references. >>>>>> >>>>>> Also, I use recursion, which I have a weakness for, but a lot of >>>>>folks >>>>>> recommending rewriting recursion to use iterative algorithm. >>>>>> >>>>>> HTH.>HELP! My system was supposed to be finished today and suddenly my form is not releasing. I know that it probably means there is a reference to an object somewhere but I can't for the life of me find it. (I don't use PEMSTATUS more than once in the form.) Is there any way to make sure that all the objects associated with a form get released when I say ThisForm.Release()? Any help greatly appreciated!