We are having problems with our application's "Logoff" operation, as opposed to our "Logout and Exit". The problem does not occur when running the application within the IDE, only in our deployed application.
"Logoff" simply returns the user to our logon screen, and when they log back in, the application runs more slowly. The window that I've been using takes 7 secs to display the first time you login (not great, we realise :-)), 9 secs the next time, and approximately 15 secs after 5 logoffs. This is without performing any other operations while logged in.
I've tried to ensure that all objects are destroyed before calling the Restart() function, and it looks like that is being done, but maybe I'm missing something. Before I look into that any further, I wanted to ask if anyone has had a similar problem, and see if they could guide me to a solution.
When we simply log "off", the application close event is obviously not executed. Instead, we call Restart(). In the debugger, after logging off multiple times, I can still see all the old instances of our application. The call stack is still only one level, i.e. the old instances are not in the execution chain, but they are in memory. Using Task Manager, you can see that memory usage goes up slightly after each log off. Could this have something to do with our problem? Is there a way to kill all the old instances?
I've also tried setting the FreeDBLibraries option when deploying to see if that helped, but it didn't.
Thanks,
Craig