WinStd
Windows Win32 API using Standard C++
All Classes Functions Variables Typedefs Enumerations Enumerator Modules Pages
winstd::sanitizing_allocator< _Ty > Class Template Reference

An allocator template that sanitizes each memory block before it is destroyed or reallocated. More...

#include <WinStd/Common.h>

Inheritance diagram for winstd::sanitizing_allocator< _Ty >:

Classes

struct  rebind
 Convert this type to sanitizing_allocator<_Other> More...
 

Public Types

typedef std::allocator< _Ty > _Mybase
 Base type.
 

Public Member Functions

 sanitizing_allocator () noexcept
 Construct default allocator.
 
 sanitizing_allocator (const sanitizing_allocator< _Ty > &_Othr)
 Construct by copying.
 
template<class _Other >
 sanitizing_allocator (const sanitizing_allocator< _Other > &_Othr) noexcept
 Construct from a related allocator.
 
void deallocate (_Ty *const _Ptr, const std::size_t _Count)
 Deallocate object at _Ptr sanitizing its content first.
 

Detailed Description

template<class _Ty>
class winstd::sanitizing_allocator< _Ty >

An allocator template that sanitizes each memory block before it is destroyed or reallocated.

Note
sanitizing_allocator introduces a performance penalty. However, it provides an additional level of security. Use for security sensitive data memory storage only.

The documentation for this class was generated from the following file: