summaryrefslogtreecommitdiff
path: root/include/gc_cpp.h
diff options
context:
space:
mode:
authorhboehm <hboehm>2007-05-11 00:30:36 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:39 +0400
commit9bafc5a014fb9f8042c16af23ca807a277b7c87d (patch)
tree2da66e6e436a956bdb9c42c2ff8a3cf46d2282b5 /include/gc_cpp.h
parent484e219f8e08cb205a354fe84cb952b9a1b17e3d (diff)
downloadbdwgc-9bafc5a014fb9f8042c16af23ca807a277b7c87d.tar.gz
2007-05-10 Hans Boehm <Hans.Boehm@hp.com>
* include/gc_cpp.h: Documentation updates. * include/gc_config_macros.h: Don't check for __ppc__ to set DARWIN_THREADS. * Makefile.am: Include configure_atomic_ops.sh in dist. * Makefile.in: Regenerate.
Diffstat (limited to 'include/gc_cpp.h')
-rw-r--r--include/gc_cpp.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/gc_cpp.h b/include/gc_cpp.h
index da2fac02..d3df2112 100644
--- a/include/gc_cpp.h
+++ b/include/gc_cpp.h
@@ -48,6 +48,12 @@ using the NoGC placement:
class A: public gc {...};
A* a = new (NoGC) A; // a is uncollectable.
+The new(PointerFreeGC) syntax allows the allocation of collectable
+objects that are not scanned by the collector. This useful if you
+are allocating compressed data, bitmaps, or network packets. (In
+the latter case, it may remove danger of unfriendly network packets
+intentionally containing values that cause spurious memory retention.)
+
Both uncollectable and collectable objects can be explicitly deleted
with "delete", which invokes an object's destructors and frees its
storage immediately.
@@ -80,7 +86,8 @@ objects. In practice, it finds almost all of them.
Cautions:
-1. Be sure the collector has been augmented with "make c++".
+1. Be sure the collector has been augmented with "make c++" or
+"--enable-cplusplus".
2. If your compiler supports the new "operator new[]" syntax, then
add -DGC_OPERATOR_NEW_ARRAY to the Makefile.
@@ -111,7 +118,7 @@ clean-up function:
that preserves the correct exception semantics requires a language
extension, e.g. the "gc" keyword.)
-4. Compiler bugs:
+4. Compiler bugs (now hopefully history):
* Solaris 2's CC (SC3.0) doesn't implement t->~T() correctly, so the
destructors of classes derived from gc_cleanup won't be invoked.