some doubt about console application with socket

hi everyone,
I have a small question about socket in console
I just follow a SDL socket tutorial on this website

http://content.gpwiki.org/index.php/SDL:Tutorial:Using_SDL_net

this application(the tcp server part) terminate when receive a buffer "quit" from remote client. But what if I run the server application and then close the window with the 'x' button while the client is still connected.

I know thats ok, but is there some side effect to the computer (like memory leak or something) ?

this is only a console application so I can't directly control through the applition itself.

any good suggestions? thanks in advance
Modern operating systems automatically free all resources when a process terminates, even if the programmer "forget" to do it. This is in theory, in practice you encounter nasty behavior if you don't close all sockets, opened files, etc yourself.
all right,
thanks modoran, I didn't know that knowledge before
so the os will handle that for me
or you can use atexit() function just to be sure...
Topic archived. No new replies allowed.