A few points to remember:
- You never have direct access to physical RAM. The OS gives you an abstraction of RAM. It may be physical RAM, or virtual memory paged away on some hard disk. You can never know.
- Even if some bits remain stashed away in some part of the RAM (physical or otherwise), the OS sees that memory block as free (unless it has already been taken again). I doubt you can get access to it without hacking the OS somehow.
Let me clarify my point in regards to your comment:
Let's assume you opened a file, read it to RAM, did some stuff with it, and closed the file, and your program has terminated. First, I think we all agree that the portion of RAM you used is no longer taken, and is considered free by the OS. Meaning another program that comes along and demands some RAM might receive that memory block. So, first of all, nothing resides in that memory block anymore. It's empty. Free for the OS to use at its discretion.
Now, even if some random bits of data are left hanging around (remember, you have no way of knowing if it's physical or otherwise), you have no direct access to them.
I hope this clarifies.