mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
AP_Common: add AP_ExpandingArray delete
This commit is contained in:
parent
578023483c
commit
4ef3005d2c
@ -47,6 +47,16 @@ public:
|
||||
chunk_size(elements_per_chunk)
|
||||
{}
|
||||
|
||||
~AP_ExpandingArray(void)
|
||||
{
|
||||
// free chunks
|
||||
for (uint16_t i=0; i<chunk_count; i++) {
|
||||
free(chunk_ptrs[i]);
|
||||
}
|
||||
// free chunks_ptrs array
|
||||
free(chunk_ptrs);
|
||||
}
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_ExpandingArray<T>(const AP_ExpandingArray<T> &other) = delete;
|
||||
AP_ExpandingArray<T> &operator=(const AP_ExpandingArray<T>&) = delete;
|
||||
|
Loading…
Reference in New Issue
Block a user