Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Class sometimes gives Memory Insufficient Error!!!
Message
From
06/08/1999 12:30:25
 
 
To
06/08/1999 01:20:02
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00250545
Message ID:
00250736
Views:
11
Hi Bernard ----

What are you using for your serial communications? The Fox library of the MSCOMM DLL? Try switching from one to the other and see if that helps.

>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
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform