Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Class sometimes gives Memory Insufficient Error!!!
Message
 
 
To
06/08/1999 01:20:02
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00250545
Message ID:
00250626
Views:
14
You say this has not always been the behavior. In other words, you used to not get the out of memory error. Have there been any changes made to the workstation
configuration or any other changes you can think of? By itself, it does not appear the form is the cause of you memory problems. I suspect it is somewhere else in your application. Perhaps it is with the process that involves the COM Port.

>In my app I need to pause the current process and display a message on an external (thru COM port) device. Since data is coming in from other ports on the computer that I monitor, I use a form class with a timer.
>
>Form Props:
>
>Top = 468
>Left = 4
>Height = 22
>Width = 104
>ShowWindow = 1
>DoCreate = .T.
>Caption = "Form1"
>Visible = .T.
>WindowType = 1
>Name = "delayform"
>
>Methods:
>
>PROCEDURE Init
>PARAMETERS nInterval
>ThisForm.Timer1.Interval = nInterval
>ThisForm.Timer1.Enabled = .T.
>ENDPROC
>
>PROCEDURE Unload
>ret_value = .T.
>RETURN ret_value
>ENDPROC
>
>The timer1 has this code in it's timer event:
>
>PROCEDURE Timer
>This.Enabled = .F.
>Thisform.Release
>ENDPROC
>
>So I call it as so
>
>obb = CREATEOBJECT("delayform",5000)
>obb.show
>
>So the form starts up and enables the timer which fires after 5 seconds. The Timer1.Timer event disables the timer and closes the form.THus I get my 5 second delay. (INKEY is out as it allows keystrokes to terminate it. )
>
>This works fine for my needs. But of late I have noticed that I get an error at the CREATEOBJECT line
>
>"Not Enough Memory to complete this operation" running in NT as well as 95/98.
>
>I have checked in the locals window and the form object is released when the form closes. What is causing this memory error. Am I doing something wrong in the calling and releasing of the form? Is there a leak in memory?
>
>Please help
>
>Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform