UPDATE 3/27/2013
It would appear that I am not leaking memory, it is just WT not keeping a persistent session every time F5 is hit, or a new user connects. Basically the old session gets deleted, and a new one is made every time F5 is hit, or a new user connects from another machine. I have read some parts of the documentation that mention making the session persistent, so when a user reloads the page, or a different user connects they all see the same content. However, I have not been able to get it working yet. I think it is a function call or a setting in the wt_config.xml file. Will update if I make any other progress.
ORIGINAL POST
So my question is, how do I clean up memory in WT so every time the user presses F5 on the page the memory use stays the same in the task manager?
Ok, so I am working with WT pronounced (witty) and I have noticed that my server application consumes more memory every time the user hits F5 on the page to refresh it, which to me looks like I am leaking memory, but I followed the same process as WT most basic applications...
So, I went back to the most basic WT app I could find, the hello application the code for which, and the working example, can be found here(http://www.webtoolkit.eu/wt/examples/) if you have not personally built the project.
Once I ran the example on my machine and hit F5 on the page, the memory in my task manager increased.
My likely suspect is this function below.
WApplication *createApplication(const WEnvironment& env)
{
/*
* You could read information from the environment to decide whether
* the user has permission to start a new application
*/
return new HelloApplication(env);
}
It gets called every time F5 is hit and makes a new instance of the HelloApplication which inherits from WApplication.
Some things I have tried to remedy the situation that have not worked include: Keeping 2 pointers for the HelloApplication so I can delete the old pointer every time a new one is allocated. Calling the quit() function, and deleting the pointer. Just calling the quit() function. I have also looked around on the WT documentation site(http://www.webtoolkit.eu/wt/doc/reference/html/index.html) for more detailed information on the class and it's methods, but have not come up with anything that worked.
I ask that anyone responding please be as detailed as possible in how to handle the cleanup of the memory. An example would be much appreciated, thanks in advance!