terminal
terminal copied to clipboard
TextBuffer::ResizeTraditional may leak stale pointers
The catch clause will allow BufferAllocator to be destroyed while the ROWs in _storage continue to reference its memory. The solution is to refactor ROW::Resize from being a mutating function over to allocating a new _storage vector and copying all rows over. That way the TextBuffer is only mutated once at the end, long after all throwing code has finished executing.