This safe, "no worries" C++ was segfaulting. You've managed to make it correct today but it's still unsafe.
Someday one of your coworkers is going to break it and this code will be trashing the heap. Mysterious memory corruption failures are your destiny.
That said, Happy Halloween!