![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
Why is it that in debug/runtime after exiting my application I either have to hit stop in debug or use the task manager to actually stop the program from running?
The program uses sockets. Is it possible one is being left open or is there another general reason why this happens? Thanks
__________________
"When in Rome, Do as the Romans Do" "Beauty is in the eye of the BEER holder" "Save your breath your going to need it for your blow up doll later" SearchLores.org |
|
|
|
|
|
#2 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 329
Rep Power: 3
![]() |
Re: Program not closing?
Is your application creating any threads, if so it could be some thread is refusing to terminate cause it's still working. Check this ebook out, I think it explains the procedure involved closing a thraed
__________________
Quote:
|
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
Re: Program not closing?
if you are closing the program in a window that is not the original window that was created when you hit run, then you have to press the stop button.
__________________
|
|
|
|
|
|
#4 | |
|
Expert Programmer
|
Re: Program not closing?
Quote:
Thanks I'm aware of the stop button, thanks. My problem also occurs outside of the debugger when the [X] is hit. The process can still be found in the task manager list. (and no I'm not referring to the vhost.exe)
__________________
"When in Rome, Do as the Romans Do" "Beauty is in the eye of the BEER holder" "Save your breath your going to need it for your blow up doll later" SearchLores.org |
|
|
|
|
|
|
#5 |
|
Expert Programmer
|
Re: Program not closing?
I'm still having the same issue. This is my deconstructor and my RemoveClient method.
C# Syntax (Toggle Plain Text)
__________________
"When in Rome, Do as the Romans Do" "Beauty is in the eye of the BEER holder" "Save your breath your going to need it for your blow up doll later" SearchLores.org |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Oct 2007
Posts: 29
Rep Power: 0
![]() |
Re: Program not closing?
To cleanup managed resources derive from IDisposable and carry out your routine in the implementation of the Dispose method. Destructors should be used to cleanup unmanaged resources and wont work as you probably expect for managed types.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hello, I'd like to write a program for my work. | blake_jl | Community Introductions | 13 | Nov 23rd, 2007 4:31 PM |
| Language display in program | Prm753 | C++ | 3 | May 30th, 2006 5:45 PM |
| Program keeps on closing | jobobshishkabob | C++ | 6 | Jan 30th, 2006 9:44 PM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |