I have a quite sizeable application written primarily in J# (with some C#). Under the .NET framework 2.0, when the close button on the main window is clicked, the exe remains in memory after the application exits.
In the previous version of the .NET framework this did not happen.
There is one slight difference in the code under 2.0. In the form_Closed() event, it is now illegal to put a System.exit() call which worked perfectly well in the previous version.
I have set a breakpoint in the debugger in the Dispose() method to see if there are any active threads, and find only a few system threads with <no name>.
How can i get this exe to exit, and how can i find out what is preventing it from terminating
Thanks in advance

Application does not exit, remains in memory
schliden
Can you please tell us is what is the nature of your application and what does it actually do Does it hold any system resources or creates a no of threads
Since previously app was calling System.Exit() , it was a forcefull shutdown of app. But now may be few of the resources are not being released.
On the related note, does you app implements IDisposable interface
Thanks.
R055
I have resolved this by placing System.exit(0) in the Dispose() method of the main form.
Not exactly ideal but it works.
Barry
pyromaster64
This is an IDE written in J#. This problem does not exist in 1.1 just 2.0.
The application does not implement the IDisposable interface. What use would that be This application should exit when the close window button is clicked surely.
The threads created are all terminated as can be seen in the debugger but there are still some <no name> threads that must be system created.
How can i find out what the application is waiting for It seems this information is not available in the debugger.