Refreshing RAM and closing a window in Windows

I don’t know where I heard this…but I seem to recall that if you exit a program by going File-Exit, it refreshes the RAM more reliably than if you were to simply click on the X in the upper right corner. Is this true?

If I recall correctly, they both end up calling the same windows function.

RAM refresh is a hardware function. The operating system knows nothing about it and has no control whatsoever over it (unless you get sneaky and try to reprogram the refresh timers).

I assume instead that you are talking about de-allocating memory and things like that, which I believe is handled the same way whether you click the X or do a file -> exit.

Nope

This probably stems from the fact that some programs don’t exit when the X is clicked, but are just minimized into the tray.

It depends on what program and how the program was created. If the FILE-EXIT command in that application happens to call a bunch of code which de-allocates memory, then yes. The X button just closes the application and may skip a lot of the programmer’s cleanup routine. Of course, a good programmer will have it handled the same way (“onClose”) but you can’t paint with a wide brush (Nanoda) and have a definitive answer either way. You’d have to check each individual program with a resource monitor.

In a badly-written program, it could go either way though; the ‘X’ in the top corner of the window is (in most cases) part of the Windows API and closes the application. Menus and buttons that say ‘Quit’, on the other hand, need to be coded - this code might be necessary to close the thing gracefully, as NBIT33 suggests, or it might terminate the application in an unconventional way and prevent Windows from doing what it normally does when you click the X.

Ok, I suppose engineer_comp_geek is correct and what I meant was de-allocating memory, but just in case I’ll explain what I think and you can assign whatever terminology to it you want.

What I’ve heard is that Microsoft programs are some times sloppy about cleaning up after themselves. IE, when they are closed, they don’t always free up the same amount of RAM that they were using.
I have to say that in my experience with both Macs and PC’s that Macs do seem to have a better record with RAM…I’m still a PC person and Macs are evil, but I used Macs in HS to work with huge audio files and I know that if I’d done that with my PC back home (Which is WinME, 800Mhz, 256Mb RAM, so it’s not an ancient dinosaur yet) it would have locked up.

And then the other bit of unconfirmed knowledge was that exiting by using File-Exit was a “cleaner” exit. Once again relying on my experience, I tend to think that NBIT33 has got it right that it depends on the program.

Anyway, thanks for all your responses.

A little off topic but…

are memory managers that ‘free’ up non-reallocated memory at all useful? I used to use one on an old Win95 machine that had very little memory. The program showed virtual memory, physical memory usage, etc. When most program were exited the momory was not reallocated properly. This program (don’t remember the name), would defragment memory, and then reallocate it. Does this help any? or will Windows reallocate the memory when it’s needed? Is this of any use with a more modern computer with more memory?