Why don't you make a new instance of Reference using operator new and store the pointer to File's std::vector<std::unique_ptr<Reference>>? If you do that, Reference's destructor would be called. Is there any reason to continue using BumpPtrAllocator? http://reviews.llvm.org/D6518