Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stack corruption ?
Message
From
11/05/2006 06:02:05
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01120725
Message ID:
01120932
Views:
12
Return Value = Character.
SYS(1104) returns the number of bytes that could not be purged. SYS(1104) returns "0" if all memory is purged.

>Hi,
>
>Thanks for the suggestion. I tried that but, AFAICS, it had not effect. However help says SYS(1104) returns 0 if successful; I get back 136 - goodness knows what that means....
>
>It does look as if the SYS(1016) value creeps up (from 31054888 to about 31598968). I'd expect that sort of increase - but don't know if it can be a problem. Odd thing is that, if this is a resources problem, the POF is always exactly the same...
>
>Regards,
>Viv
>
>
>>I don't know that it'll do you any good, but I have used Sys(1104)when I encountered memory leaks.
>>
>>HTH
>
>>>Could use some ideas on this (but I don't know whether it's a VFP or VB problem):
>>>
>>>In a VFP app I have a container that contains a collection of containers. Each of the inner containers is basically a wrapper for a VB user control (from an OCX)
>>>VFP passes a reference to the outer container to a function of another VB user control. Basic VB processing is:
>>>
>>>
>>>Function A(oOuter as object)
>>>For Each o In oOuter   ' (i.e each inner vfp container)
>>>  B(o)
>>>Next
>>>
>>>Function B(o as object)
>>>On Error Goto ErrHandler
>>>With o.oref         'oref is vb object in vfp container
>>>  ' read a couple of oref properties
>>>  .orefMethod()             'Call a function of the VB object
>>>  ' more code
>>>End With
>>>Exit Function
>>>ErrHandler:
>>>End Function
>>>
>>>
>>>The above code runs fine for a few hundred iterations but eventually the VFP Exe hangs. If I run the application from the command window there's a 'Pushjmp/Popjmp mismatch' error in VFP. Debugging the VB code shows that although the .oRefMethod call runs without error execution afterwards jumps to the Errhandler (i.e it appears as if the return address is wrong). Same thing happens even if .oRefMethod() is a 'dummy' function - i.e. returns immediately with no code executed. Never seems to be a problem if I comment out the call to orefMethod() in Function B. AFAICS there doesn't appear to be any memory leak or shortage of resources.
>>>
>>>TIA,
>>>Viv
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform