Author: gribozavr
Date: Sat Oct  6 12:23:59 2012
New Revision: 165365

URL: http://llvm.org/viewvc/llvm-project?rev=165365&view=rev
Log:
List of potential checkers: smart pointer checker: actually, unique_ptr<T[]>
will do the right thing for new[] allocated memory.  Thanks David!

Modified:
    cfe/trunk/www/analyzer/potential_checkers.html

Modified: cfe/trunk/www/analyzer/potential_checkers.html
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/www/analyzer/potential_checkers.html?rev=165365&r1=165364&r2=165365&view=diff
==============================================================================
--- cfe/trunk/www/analyzer/potential_checkers.html (original)
+++ cfe/trunk/www/analyzer/potential_checkers.html Sat Oct  6 12:23:59 2012
@@ -270,8 +270,10 @@
 (C++)</span><br><br>
 C++03: auto_ptr should store a pointer to an object obtained via new as 
allocated
 memory will be cleaned using delete<br>
-C++11: unique_ptr and shared_ptr allow
-to specify a custom deleter to handle the new[]/delete[] case correctly
+C++11: one should use unique_ptr&lt;T[]&gt; to keep a pointer to memory
+allocated by new[]<br>
+C++11: to keep a pointer to memory allocated by new[] in a shared_ptr one
+should use a custom deleter that calls delete[]
 </td><td><pre>
 #include &lt;stdlib.h&gt;
 #include &lt;memory&gt;


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to