Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects don't appear to be released.
Message
From
11/12/1998 09:21:55
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
11/12/1998 09:15:35
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00166511
Message ID:
00166527
Views:
17
Hi,

No, the only external link to the form is the loForm variable used in the CreateForm method.

The forms have to behave like spreadsheets, so I do have a form level property that is an array with an object reference to each textbox. I did think that this might be causing the problem, so I tried stripping it out, but I still had the problem.

Mark

>Do you have any property or variable that still have a link to your form? VFP will not release an object until all references to this object are not released.
>
>HTH
>
>>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.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform