While release does get rid of the form, it does not clear the data environment if the is a problem. I traced the problem in my framework that I have been using for about 4 years now.
Thanks for your help.
>Hi James,
>this is the code I use ...
>
>o=NEWOBJECT("afindregion","aforms")
>o.show(1)
>if vartype(o)='O' AND !isnull(o) THEN
> o.release()
>enif vartype(o)='O'
>o=.null.
>
>
>Agnes
>>Hi All
>>
>>I am using vfp7 sp1. I have built a form class that will not release. Here is the code.
>>o=NEWOBJECT("afindregion","aforms")
>>o.show(1)
>>o=.null.
>>
>>I have done this many times and releasing o should release the form. In the when I had this problem I found an object stored as a property that would not let it release. This time I can’t seem to find any reason for it. Is there something wrong with what I am doing? If not, how do you find this type of problem?
>>
>>Thanks.
>>
>>PS I have several places that I am using this.newobject(... to create instantiate an object. Will creating an object this way release it self?