473,545 Members | 2,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Exi t 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 1407
Ebrahim <eb************ ****@hotmail.co m> 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.Exi t 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.co m>
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.Exi t() to end it.

Technically, Application.Exi t() 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.co m> wrote in message
news:c5******** *************** **@posting.goog le.com...
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.Exi t 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.Exi t 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
1642
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 System.Web.HttpApplication but it does not seem to like that one bit. I also have a MSXML2.DOMDocument30 defined as a public object within the vb module which is...
14
4821
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 can be done using the designer but I intentionally don't want to use that. The one reason is that you cannot change the code generated by the...
55
6165
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 C# in some way? Or maybe no, because it is similar to a global variable (with its scope restricted) which C# is dead against? Zytan
29
3287
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 use it in sync mode. Any ideas what can I do? Thanks, Zalek.
0
7689
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7943
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7456
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7786
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.