473,395 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Does an Application ever fully close in .NET??

I have made several applications (not all are done yet) using the .NET
framework but none of them seem to close well with the
Application.Exit function. I use Windows.XP so when i do a Processes
check they still remain in memmory after the function has been called
?
Since they are still bieng read from the .NET env it doesnt matter
much , but if i run the EXE file then there is no way to actually exit
the Application unless I end it manually from the Task Manager.
Does any one have a remedy for this??
Nov 15 '05 #1
4 1398
Ebrahim <eb****************@hotmail.com> wrote:
I have made several applications (not all are done yet) using the .NET
framework but none of them seem to close well with the
Application.Exit function. I use Windows.XP so when i do a Processes
check they still remain in memmory after the function has been called
?
Since they are still bieng read from the .NET env it doesnt matter
much , but if i run the EXE file then there is no way to actually exit
the Application unless I end it manually from the Task Manager.
Does any one have a remedy for this??


Could you post a short but complete example which demonstrates the
problem? It usually occurs if you have some foreground threads still
running which you don't really want to be running any more.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
Curious. I have not observed this problem.

I assume these are windowed applications that include Application.Run() to
start the action and Application.Exit() to end it.

Technically, Application.Exit() ends the message loop which is started by
Application.Run(). Execution then proceeds from Application.Run() to the
end of the program.

"Ebrahim" <eb****************@hotmail.com> wrote in message
news:c5*************************@posting.google.co m...
I have made several applications (not all are done yet) using the .NET
framework but none of them seem to close well with the
Application.Exit function. I use Windows.XP so when i do a Processes
check they still remain in memmory after the function has been called
?
Since they are still bieng read from the .NET env it doesnt matter
much , but if i run the EXE file then there is no way to actually exit
the Application unless I end it manually from the Task Manager.
Does any one have a remedy for this??

Nov 15 '05 #3
Only time i have notice this is when i have other threads still running.
My solution was to follow a ShutDown pattern for all my threads. As part
of the shutdown of any given thread it calls the shutdown method on any
child thread they may have spawned. Do a google search to find out more
about shutdown patterns.

Hope this helps
Leon Lambert

Ebrahim wrote:
I have made several applications (not all are done yet) using the .NET
framework but none of them seem to close well with the
Application.Exit function. I use Windows.XP so when i do a Processes
check they still remain in memmory after the function has been called
?
Since they are still bieng read from the .NET env it doesnt matter
much , but if i run the EXE file then there is no way to actually exit
the Application unless I end it manually from the Task Manager.
Does any one have a remedy for this??

Nov 15 '05 #4
hi
what prameter do you give the exit function .. try to give it 1 as a
prameter.

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
29
by: zalek | last post by:
I am writing application with Ajax in sync mode - xmlHttp.open("GET", url, false). I noticed that in FireFox handler doesn't starts. It starts when I use xmlHttp.open("GET", url,true). I need to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.