>I created an object using CREATEOBJECT and placed a method in
>the object called "RELEASE".
>
>The method had only one statement ...
>
>"RELASE THIS"
>
>Later on in the procedure i attempt
>
>OBJECTNAME.RELEASE
>
>but the variable still exists in memory.
>
>As a work around i simply do a RELEASE OBJECTNAME
>and this works fine.
>
>However isnt the RELEASE method supposed to work as well?
>
>TIA,
>Dave.
To truly release an object, you need to release all references to it. An object holds an internal reference counter and will not go away until it reaches 0. The right way to do this is by assigning the object to a variable when it is created, and then releasing the variable when you want it to go away.
PRIVATE oObj
oObj = CREATEOBJ('myclass')
RELEASE oObj
Erik Moore
Clientelligence