diff -r 20339a90049b -r 1b328492b7f8 hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp Fri Nov 07 12:52:16 2008 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp Fri Nov 14 14:23:05 2008 -0800 @@ -62,7 +62,9 @@ // given PtrQueueSet. PtrQueue(PtrQueueSet*, bool perm = false); // Release any contained resources. - ~PtrQueue(); + void flush(); + // Calls flush() when destroyed. + ~PtrQueue() { flush(); } // Associate a lock with a ptr queue. void set_lock(Mutex* lock) { _lock = lock; }