App Shutdown C# Windows

638 Views Asked by At

my C# app is still in RAM after executing Application.Current.Shutdown();

(db connection is closed before)

(Application.Current.Exit += new ExitEventHandler(Current_Exit); is also used )

is there another statement to use ?

the problem occurs on different Windows Xp systems and on Server 2008.

kind regards, jeff

2

There are 2 best solutions below

1
On BEST ANSWER

If you spawned some threads, they might still be running. Either make sure they're finished before closing the application, or make sure you set the "IsBackground" property of the threads to "true" so they die with the application.

0
On

This happens if you still have running threads.