equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
34 _size(0), |
34 _size(0), |
35 _capacity(0) {} |
35 _capacity(0) {} |
36 |
36 |
37 template <typename T> |
37 template <typename T> |
38 inline ZArray<T>::~ZArray() { |
38 inline ZArray<T>::~ZArray() { |
39 if (_array != NULL) { |
39 FREE_C_HEAP_ARRAY(T, _array); |
40 FREE_C_HEAP_ARRAY(T, _array); |
|
41 } |
|
42 } |
40 } |
43 |
41 |
44 template <typename T> |
42 template <typename T> |
45 inline size_t ZArray<T>::size() const { |
43 inline size_t ZArray<T>::size() const { |
46 return _size; |
44 return _size; |