I created my own allocator like so:
template
class BasicAllocator
{
public:
typedef size_t size_type;
typedef ptrdiff_t
Well, the destructor is not virtual. This is not a direct problem if you don't use the allocator polymorphically. But consider this case, where BasicAllocator inherits from std::allocator:
std::allocator* ptr = new BasicAllocator();
// ...
delete ptr;
The destructor of BasicAllocator is never called, leading to a memory leak.