You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For owned or transferred pointers, we should be using std::unique_ptr for RAII and memory management. Especially in context of exception handling and potentially returning new allocations to client code which may not assign and own the pointer. For example, all factory methods leak by default.
The text was updated successfully, but these errors were encountered:
samhatchett
changed the title
Consider using unique_ptr or shared_ptr instead of raw pointer access
Consider using unique_ptr or shared_ptr instead of raw pointer access
Aug 4, 2016
For owned or transferred pointers, we should be using
std::unique_ptr
for RAII and memory management. Especially in context of exception handling and potentially returningnew
allocations to client code which may not assign and own the pointer. For example, allfactory
methods leak by default.The text was updated successfully, but these errors were encountered: