>Hi All,
>
>Hello Experts!
>
>I have been stumped at this all morning and can't seem to figure out why this data entry form doesn't seem to release completely!
>
>I used a DataEnvironment subclass as my 'data layer', a Custom subclass as my business object.
>
>In my data entry form (also a class), I then assigned DEClass and DEClassLibrary to my 'data layer'.
>
>I then drop my BO class on the form, which has a property oDataLayer, which at design time, I assigned an '=thisform.mydatalayer' as its value, pointing to the DE.
>
>All UI calls are made to the BO, which in turns relays the request to BO.oDataLayer.
>
>Everything worked perfectly: Adding, Modifying, Deleting...
>
>When I close the form, I can still see in the Data Session Window! drats!
>
>I used the same data entry form class using native tables, but it does not leave dangling references.
>
>Thanks in advance for any help.
>
>More Power.
>
>Dennis
You need to call some kind of "clean up" method to remove the internal reference in your BO.oDataLayer. You can't do it in the BO.Destroy, since that occurs AFTER the Form.Destroy, but you could put it in the Form.Destroy. You could also use BINDEVENT to the form Destroy to call a method on your BO object to do the clean up itself.