1.1 --- a/src/share/vm/gc_implementation/g1/ptrQueue.hpp Wed Oct 22 11:18:17 2014 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.hpp Thu Oct 23 12:02:08 2014 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -65,15 +65,18 @@ 1.11 Mutex* _lock; 1.12 1.13 PtrQueueSet* qset() { return _qset; } 1.14 + bool is_permanent() const { return _perm; } 1.15 + 1.16 + // Process queue entries and release resources, if not permanent. 1.17 + void flush_impl(); 1.18 1.19 public: 1.20 // Initialize this queue to contain a null buffer, and be part of the 1.21 // given PtrQueueSet. 1.22 PtrQueue(PtrQueueSet* qset, bool perm = false, bool active = false); 1.23 - // Release any contained resources. 1.24 - virtual void flush(); 1.25 - // Calls flush() when destroyed. 1.26 - ~PtrQueue() { flush(); } 1.27 + 1.28 + // Requires queue flushed or permanent. 1.29 + ~PtrQueue(); 1.30 1.31 // Associate a lock with a ptr queue. 1.32 void set_lock(Mutex* lock) { _lock = lock; }