For certain events, it would increase user security to generate a transaction that sweeps funds into new keys.
Examples when a sweep would be useful:
- When importing a private key, such as a casascius coin or scratch-off.
- When encrypting a previously-unencrypted wallet, and some coins remain on the unencrypted keys.
This sweep must be optional, in case the user has a reason to not generate a transaction at that moment.