Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not enough memory to complete this operation (Error 43)
Message
From
31/03/2004 03:28:22
 
 
To
29/03/2004 02:01:47
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00890245
Message ID:
00891092
Views:
19
Gentlemen,

The honors go to you, the faults (as usual) are all mine.

I believe I've pinned it down to the way I implemented the loading of the form's menu. Basically, the menu got defined over and over again.
To no surprise, since (This.cMenuName) holds a unique variable every time.
* Form Activate, previously
  DO 'Menus\Main.mpr' WITH THIS,.F.
  RELEASE PAD ExitForm OF (THIS.cMenuname)
  ACTIVATE MENU (THIS.cMenuname) NOWAIT

* Now
=SYS(1104)  && Manual garbage collection of sorts, thank's Jos!
TRY
	RELEASE MENUS (THIS.cMenuname)
	DO 'Menus\Main.mpr' WITH THIS,.F.
	RELEASE PAD ExitForm OF (THIS.cMenuname)
	ACTIVATE MENU (THIS.cMenuname) NOWAIT
CATCH TO oException
	DO 'Menus\Main.mpr' WITH THIS,.F.
	RELEASE PAD ExitForm OF (THIS.cMenuname)
	ACTIVATE MENU (THIS.cMenuname) NOWAIT
	oException = NULL
	RELEASE oException
ENDTRY
I don't know exactly how VFP handles this sort of thing internally, but one can hardly blame it for getting overloaded and -eventually- crashing.

Best Regards

Peter






>Peter.
>
>1) How much memory gets used each time you activate form 1 then form 2 etc. Is it significant?
>
>2) Does VFP actually end up having a problem? ie. have you tried to go "all the way" to a point of failure?
>
>3) What is on those forms? Any active x controls, any special processing in the activate event?
>
>4) If you have x Mg memory before you start your app, then run your app, and then exit your app, have you still got x Mg of memory? If so then its not a leak but VFP was using it for some reason and properly gave it back when the app was finished.
>
>Also, check this thread/message for some more background info:
>
>Re: SYS(3050) Not Respected According to Task Manager Thread #728197 Message #728231
>
>
>>Thank's guys,
>>
>>Jos,
>>
>>I've tried your suggestions, and they seem to slow the memory leak down, but do, as far as I can see, not eliminate the problem.
>>
>>Since this all happens just by the following sequence:
>>
>>Load Form1
>>Activate Form1
>>
>>Load Form2
>>Activate Form2
>>
>>Activate Form1
>>Activate Form2
>>Activate Form1...Activate Form2...1,2,1,2, a.s.o.
>>
Peter Pirker


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

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform