CJCombrink commented on PR #3230:
URL: https://github.com/apache/thrift/pull/3230#issuecomment-3498669007

   This is a curios observation. I am no compiler guru but would at least 
expect some effect, like setting the size to zero.
   
   I know the compiler can optimise a call like this out if it determines the 
result is unused (the curious reader can search on why memset should not be 
used in secure code)
   
   That said, one should write code that communicate intent thus `.clear()` 
makes the intent clear, so trusting the compiler will do the correct thing in 
these cases is probably a good call. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to