I have an application, in which the user blasts through about 20 forms entering accounting data.
The problem is that the more forms the user accesses, the longer the application takes to terminate. Which started me thinking that the forms are not being released properly, then the objects get released when the application terminates (it can take up to 10 - 15 seconds to stop the application).
I put a watch on the SYS(1016) value (object memory) after each form is used, and sure enough the SYS(1016) value rises between 50 and 100 K after each form is accessed.
Each form is modal, contains 100-150 textboxes, is defined as a class, and instantiated through a common method (CreateForm) , belonging to my application object.
Method CREATEFORM
LPARAMETER tcFormName
LOCAL loForm
loForm = CREATEOBJECT( tcFormName)
loForm.SHOW()
I have tried various combination of
loForm = NULL and
RELEASE loForm, after the SHOW() but no effect.
Within each form there is a CLOSE button, which runs a
THISFORM.Release(). I have tested to ensure that the Destroy events for the form and its object all run after the Release. But the memory loss still occurs.
If anyone has any suggestions, they would be appreciated.
TIA