Windows Mobile releases resources when the application is closed (.net 3.5 cf)
I have a basic .net 3.5 cf application with 4+ forms. I am using a window handler class I created to make sure that only one instance is open in some forms, while others (like product information) can be opened as many times as the user wants. My problem is that when the user closes all forms (by pressing "x" on the form, not the "exit" button in the menu), the application does not release the database connection. In addition to this, if the user closes all forms and then reopens the application, their previous search results are displayed instead of the new form. How can I free all resources when the user closes all forms?
a source to share
Keep in mind that on Windows Mobile, pressing the X button is more like minimizing the window than closing it. It will definitely not exit the application and can actually literally do the minification rather than closing the form (I don't remember exactly)
So when they open the app again, chances are it just displays the same form.
a source to share