diff a/src/hotspot/share/gc/z/zArray.inline.hpp b/src/hotspot/share/gc/z/zArray.inline.hpp --- a/src/hotspot/share/gc/z/zArray.inline.hpp +++ b/src/hotspot/share/gc/z/zArray.inline.hpp @@ -1,7 +1,7 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. @@ -34,13 +34,11 @@ _size(0), _capacity(0) {} template inline ZArray::~ZArray() { - if (_array != NULL) { - FREE_C_HEAP_ARRAY(T, _array); - } + FREE_C_HEAP_ARRAY(T, _array); } template inline size_t ZArray::size() const { return _size;