The vector is not leaking.
ptr1 and ptr2 are leaking. The vector copies the values of the memory pointed to by ptr1 and ptr2, this can be done millions of times with no problems, but if you don't free the memory pointed to by 1 and 2 you have a leak, but it has absolutely nothing to do with the vector itself.
The only reasons I can think of to put pointers in a vector are polymorphism and for shared access to objects. Both of these cases are best handled by smart pointers.
Putting native pointers in a vector when they own dynamic memory is a disaster waiting to happen. If you forget to delete them for any reason (even something like an exception being thrown), you have a memory leak. If you access the data after deleting, you have a segmentation fault.