You have no control over what happens to the memory that held the confidential content. For example, it's possible that the content was swapped out then back in at a different physical address, leading to multiple copies in the physical memory as well as in the swap space.
The risk is very low: it would take a root process or physical access to extract the password (plus some luck). Root access allows the attacker to plant undetectable malware anyway. So the only dangerous attack is extraction through a dump of the swap space (solution: encrypt your swap) or a cold boot attack on the RAM content.
You can remove that (very small, not worth worrying about unless you have very special needs) risk by running a process that allocates all the virtual memory it can get (assuming it can get everything that's available — on a 32-bit system you may need multiple such processes). This way the virtual memory will be cleared.