Please put this in context for us. Is x being used in a form? With a little more background info more specific advice could be given. If your problem is that you are allowing the user to create multiple instances of this object, and would like to release them all, you may want to store your references in an array property of an object. For example:
lnNextAvail = alen(frmMyForm.aMyObjects) + 1
frmMyForm.aMyObjects[lnNextAvail] = createobject('classx')
Using this approach, all object references would be released with the parent object. In this case, the form.
>This maybe an easy one: If I use
>
>x=createobject('classx')
>
>How can I program classx to
>
>release x
>
>If 'x' isn't always named 'x'
kenweber
GCom2 Solutions
Microsoft Certified Professional