Improve efficiency by removing allocated but unused entries from the internal array used to store the data. Set to private, though it could be useful to have this public if lists are frequently making drastic size changes (from very large to very small).
()
| 102 | * size changes (from very large to very small). |
| 103 | */ |
| 104 | private void crop() { |
| 105 | if (count != data.length) { |
| 106 | data = PApplet.subset(data, 0, count); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | |
| 111 | /** |