how does one securely clear std::string?

Based on the answer given here, I wrote an allocator to securely zero memory. #include <string> #include <windows.h> namespace secure { template <class T> class allocator : public std::allocator<T> { public: template<class U> struct rebind { typedef allocator<U> other; }; allocator() throw() {} allocator(const allocator &) throw() {} template <class U> allocator(const allocator<U>&) throw() {} … Read more