I have been monitoring my system for a few hours now.   I am beginning to think 
Dan's 

issue is not with calling the web control at all, but related to the timer eep. 



Having several users running my compiled HHMain.exe for several hours, I have 
seen no 

increase in memory.  This app is constantly changing forms, conducting database 

inquiries, adding new rows and printing.   No memory change or increase to 
speak of. 



Grader.exe has went from 69,000K when I first started monitoring to over 
284,000K 

at present.   This app calls no external form, but DOES have a form timer that 
calls 

another form which has an On After Start EEP that conducts data manipulation 
and 

then closes.  The main form's timer calls this routine every 10 seconds.  The 
routine 

calculates data from a temp table, refreshes screen data and then writes the 

manipulated data to a permanent table.  No outside controls involved anywhere 
on 

the form. 


The timer function is the only type of control that Grader.exe has that 
HHMain.exe does 

not.   So it almost certainly is related to the timer eep and/or it's content 
programming. 



 However, memory does not increase every 10 seconds, (the timer fires every 

10 seconds) so I still am not 100% sure what is causing this.  I will continue 
to 

look at my code, how the form is called, closed etc. etc.   as well as monitor 
the 

memory usage.  (Grader.exe has increased from 284,000K to 294,000K in the 

time it took me to write this email) 



While I am not having any significant problem (GRADER.exe is ran over 10 hours 

a day then shut down, it does not need restarted during the day at any time) 
this 

is something of interest. 



-Bob 


----- Original Message ----- 
From: "Dan" <[email protected]> 
To: "RBASE-L Mailing List" <[email protected]> 
Sent: Wednesday, February 17, 2010 12:41:14 PM GMT -06:00 US/Canada Central 
Subject: [RBASE-L] - Re: Memory Usage out of hand 

Dennis you are right with my first test. 

Originally I would just refresh the web content...  Memory usage increased 

Then I tried a closewindow, start new form...  Had that in a wrong spot, and 
opened more and more forms. (my bad)   Memory usage increased 

Now the start eep that calls the form originally is set up like you are 
suggesting... completely closing the form on each iteration of the loop.  
Memory usage increases. 

I am guessing the ONLY way to get the memory to reset is to close R:Base.  If 
that isn't the case, that would be best for me as I don't know how to open an 
instance of R:base to a particular  monitor.  

Without fixing this, This application uses up memory so fast that twice a day 
things fail.  Have to manually start and stop it.  Not good for an automated 
process. 



At 01:28 PM 2/17/2010, you wrote: 


Dan, 
  
I think your problem is nextelshuttle never completely goes away because it is 
calling another copy of itself. 
You should never have code that calls another form after closing the form. 
The fact that the memory is released when you completely exit your routine is a 
hint. 
  
Instead,  set up a loop which calls nextelshuttle.  
The nextelshuttle timer should just closewindow after 15 minutes. 
No other code should be rum after closewindow. 
  
This way, nextelshuttle will completely close and release memory before being 
called again. 
You will need some way of setting vQuit to �YES� at the end of the day or when 
a button is pressed on nextelshuttle 
  
Label Loop 
set up some vars... 
set var vQuit = �NO� 
edit using nextelshuttle 
if vQuit = �YES� then 
   goto Endloop 
else 
  goto Loop 
endif 
Label EndLoop 
  
  
Dennis McGrath 
  


From: [email protected] [ mailto:[email protected] ] On Behalf Of Dan 
Sent: Wednesday, February 17, 2010 11:59 AM 
To: RBASE-L Mailing List 
Subject: [RBASE-L] - Re: Memory Usage out of hand 
  
Ok, 
  I made your suggestion work, and closewindow is working now, but I think I 
need to actually close R:Base to free up the memory?  (Memory usage goes up by 
50,000 k every loop)  So, if that is the case, 
how do I have R:base open to a particular screen (I run a 4 screen setup here 
and the app I am working on has to be on the upper right, or Monitor 3) 

At 11:30 AM 2/17/2010, you wrote: 

Ok, 


Yes, Rbase Dat calls up the form: 

set up some vars... 
edit using nextelshuttle 
exit 

Nextelshuttle form timer does the 15 minutes, and calls an internal eep 

That eep, 
does : 

Closewindow 
run nextelshuttle.dan 
return 



The nextelshuttle.dan 
does lots of database stuff, and then 
edit using nextelshuttle 



The closewindow does not close the window, but a second form is generated (and 
third and so on for each loop) 

If you close the latest loop, all forms close. 

No memory is released till all forms close. 

What am I missing? 
Dan 



At 11:00 AM 2/17/2010, you wrote: 

Somewhere you have a program that calls up your form, maybe RBase.dat 
or something else.  Do the following (or something like it depending on how 
your 
system works): 

your program: 

LABEL formagain 

SET VAR vExit TEXT = NULL 
EDIT USING nextelshuttle 

IF vExit = 'yes' THEN 
  EXIT 
  RETURN 
ELSE 
  GOTO formagain 
ENDIF 
RETURN 

In your Nextelshuttle form: 
You would have a button to exit the form totally; that form's eep code would 
be: 
  SET VAR vExit = 'yes' 
  CLOSEWINDOW 
  RETURN 

And somewhere there's code that does the 15 minute timer.  In that code when 
you've reached the 15 minutes, the eep code would just have: 
  CLOSEWINDOW 
  RETURN 
or you can use the pre-defined "exit" action. 

Important:  you need the "return" even if you just have closewindow on there. 

Karen 



So, now that we have surmised that my memory issue is the use of 
IE,   I am trying to find a way to have the program close and reopen 
the form  each loop through. 

Closewindow doesn't seem to be my answer.  Anyone have any good ideas? 

Problem: 
I run an instance of R:base that opens just one form 'edit using nextelshuttle' 
The form has two objects, a clock and a web object that displays a 
city map with all our technicians on it. 
that form has a 6 minute timer to run an eep that refreshes data, 
imports info to the database, after the eep, the web refreshes. (this 
is where the memory loss is) 

I was hoping a closewindow would work, but I cannot make it close the 
form and restart a new form.  I suspect though that I would need to 
close that whole instance of R:base to free up the memory. 

Thoughts? 

Reply via email to