summaryrefslogtreecommitdiff
path: root/etc/ACE-guidelines.html
diff options
context:
space:
mode:
Diffstat (limited to 'etc/ACE-guidelines.html')
-rw-r--r--etc/ACE-guidelines.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/ACE-guidelines.html b/etc/ACE-guidelines.html
index adad2e66a31..63470821de8 100644
--- a/etc/ACE-guidelines.html
+++ b/etc/ACE-guidelines.html
@@ -223,6 +223,11 @@ bgcolor="#ffffff">
<strong><code>delete []</code></strong> to correspond to the
allocation.<p>
+ <li>Don't check for a pointer being 0 before deleting it. It's
+ always safe to delete a 0 pointer. If the pointer is visible
+ outside the local scope, it's often a good idea to 0 it
+ _after_ deleting it.<p>
+
<li>Always use <strong><code>ACE_NEW</code></strong> or
<strong><code>ACE_NEW_RETURN</code></strong> to allocate memory,
because they check for successful allocation and set errno