public y y =createobject("myContainer") Y.Click * now when VFP exec code on y, the datasession is private *RELEASE y && this release the y container, and then release the private datasession DEFINE CLASS myContainer AS container PROCEDURE Init WITH CREATEOBJECT('Session') && this build the datasession SET DATASESSION TO .DatasessionId && this bind the datasession ENDWITH && datasession costructor can to be releases ENDPROC PROCEDURE Click CREATE CURSOR privateCursor ( aa i) ? SET("Datasession"),ALIAS() ENDPROC ENDDEFINE