Call whenever a Structure setting is changed which might affect its memory layout.
()
| 258 | * memory layout. |
| 259 | */ |
| 260 | private void layoutChanged() { |
| 261 | if (this.size != CALCULATE_SIZE) { |
| 262 | this.size = CALCULATE_SIZE; |
| 263 | if (this.memory instanceof AutoAllocated) { |
| 264 | this.memory = null; |
| 265 | } |
| 266 | // recalculate layout, since it was done once already |
| 267 | ensureAllocated(); |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | /** Set the desired encoding to use when writing String fields to native |
| 272 | * memory. |
no test coverage detected