Click here to Skip to main content
15,887,175 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: 1 stable 2 super stable Pin
dandy7211-Sep-23 5:29
dandy7211-Sep-23 5:29 
GeneralRe: 1 stable 2 super stable Pin
Calin Negru9-Sep-23 5:57
Calin Negru9-Sep-23 5:57 
GeneralRe: 1 stable 2 super stable Pin
Matt Bond11-Sep-23 5:24
Matt Bond11-Sep-23 5:24 
GeneralRe: 1 stable 2 super stable Pin
jschell8-Sep-23 8:13
jschell8-Sep-23 8:13 
GeneralRe: 1 stable 2 super stable Pin
Calin Negru8-Sep-23 9:02
Calin Negru8-Sep-23 9:02 
GeneralRe: 1 stable 2 super stable Pin
Amarnath S8-Sep-23 15:32
professionalAmarnath S8-Sep-23 15:32 
GeneralRe: 1 stable 2 super stable Pin
Calin Negru8-Sep-23 22:16
Calin Negru8-Sep-23 22:16 
GeneralRe: 1 stable 2 super stable Pin
jschell11-Sep-23 5:51
jschell11-Sep-23 5:51 
Calin Negru wrote:
and did not dispose things properly (leaving a mess behind in your app on exit) the OS would have been unforgiving


I don't remember anything like that.

For example pipes did not exist. So certainly no way to leave one of those around.
Files were closed when the app exited.
Memory was returned when the app exited.
Pretty sure sockets were closed when the app exited.
Not sure about UI 'handles' but I think they were returned too, probably because they were actually virtual and handled in memory (see above.)

Now all of that is true. Except it is possible to leave a named pipe hanging around but that is pretty much exactly the point (the programmer, not the OS, is responsible for the lifetime.)

Keep in mind of course that right now, because of the way sockets are defined, when the app exits the sockets are not immediately closed. The protocol must be respected. But now and then if you have an open client socket and either unplug (hardware) from the network, crash the computer or power off the computer then the socket is, by definition, still open.


Calin Negru wrote:
On Windows 10 if you leave a mess on exit the OS won’t say a thing no dialog boxes or messages telling you about corrupted memory, or that the app has exited with errors.


As stated that is not possible.

Regardless of how the application exits the memory is returned to the OS. Even if you overwrite the application stack and/or code space the memory will still be returned.

With older OSes it was easier to write into spaces where one shouldn't. Which is not the same as saying it was easy. Nor is one absolutely precluded from doing it now.
GeneralRe: 1 stable 2 super stable Pin
trønderen8-Sep-23 8:38
trønderen8-Sep-23 8:38 
GeneralRe: 1 stable 2 super stable Pin
Nelek9-Sep-23 3:25
protectorNelek9-Sep-23 3:25 
GeneralRe: 1 stable 2 super stable Pin
obermd8-Sep-23 11:14
obermd8-Sep-23 11:14 
GeneralRe: 1 stable 2 super stable Pin
Calin Negru8-Sep-23 21:49
Calin Negru8-Sep-23 21:49 
GeneralRe: 1 stable 2 super stable Pin
Richard MacCutchan8-Sep-23 21:49
mveRichard MacCutchan8-Sep-23 21:49 
GeneralRe: 1 stable 2 super stable Pin
Calin Negru9-Sep-23 3:37
Calin Negru9-Sep-23 3:37 
GeneralRe: 1 stable 2 super stable Pin
Jacquers9-Sep-23 4:21
Jacquers9-Sep-23 4:21 
GeneralRe: 1 stable 2 super stable Pin
honey the codewitch9-Sep-23 4:44
mvahoney the codewitch9-Sep-23 4:44 
GeneralRe: 1 stable 2 super stable Pin
trønderen9-Sep-23 5:17
trønderen9-Sep-23 5:17 
GeneralRe: 1 stable 2 super stable Pin
honey the codewitch9-Sep-23 5:52
mvahoney the codewitch9-Sep-23 5:52 
GeneralRe: 1 stable 2 super stable Pin
Daniel Pfeffer9-Sep-23 7:15
professionalDaniel Pfeffer9-Sep-23 7:15 
GeneralRe: 1 stable 2 super stable Pin
honey the codewitch9-Sep-23 8:11
mvahoney the codewitch9-Sep-23 8:11 
GeneralRe: 1 stable 2 super stable Pin
trønderen9-Sep-23 8:06
trønderen9-Sep-23 8:06 
GeneralRe: 1 stable 2 super stable Pin
honey the codewitch9-Sep-23 8:11
mvahoney the codewitch9-Sep-23 8:11 
GeneralRe: 1 stable 2 super stable Pin
pmauriks10-Sep-23 21:41
pmauriks10-Sep-23 21:41 
GeneralRe: 1 stable 2 super stable Pin
Calin Negru11-Sep-23 3:52
Calin Negru11-Sep-23 3:52 
GeneralRe: 1 stable 2 super stable Pin
sasadler11-Sep-23 5:45
sasadler11-Sep-23 5:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.