piiswrong closed pull request #9439: Add recommendation to use RAII to the 
contributors guide
URL: https://github.com/apache/incubator-mxnet/pull/9439
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/community/contribute.md b/docs/community/contribute.md
index 7a38295a5a..5bb790eed7 100644
--- a/docs/community/contribute.md
+++ b/docs/community/contribute.md
@@ -10,7 +10,12 @@ After your patch has been merged, remember to add your name 
to [CONTRIBUTORS.md]
 
 - Follow the [Google C++ Style 
Guide](https://google.github.io/styleguide/cppguide.html) for C++ code.
 - Use doxygen to document all of the interface code.
-- To reproduce the linter checks, type ```make lint```.
+- Use [RAII](http://en.cppreference.com/w/cpp/language/raii) to manage 
resources, including smart
+ pointers like shared_ptr and unique_ptr as well as allocating in constructors 
and deallocating in
+ destructors. Avoid explicit calls to new and delete when possible. Use 
make_shared and make_unique
+  instead.
+- To reproduce the linter checks, type ```make lint```. (You need to pip 
install pylint and cpplint
+ before)
 
 ### Python Package
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to