You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/05/24 00:49:51 UTC

[GitHub] [accumulo] ctubbsii commented on pull request #2723: Match new[] with delete[]

ctubbsii commented on PR #2723:
URL: https://github.com/apache/accumulo/pull/2723#issuecomment-1135280444

   Thanks @nosewings . That's a nice and simple fix if that's all we have to do. I'm skeptical, though, because we're not always assigning it with `new[]`.
   
   Example:
   
   ```cpp
         if(lba == NULL)
           keyData = new uint8_t[totalLen];
         else
           keyData = (uint8_t *)lba->allocate(totalLen);
   ```
   
   Is it still okay to delete it using `delete[]`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org