Browse Source
Sometimes (like in DataFlash) the size of the ring buffer will be determined in run time and the object can have size zero until proper initialization. When this was the case, an underflow in ::get_size would mess with the initializing algorithm. Another issue was that the 'new' operator could fail what was not being handled. Now, we only set the size member after we are sure 'new' successfully allocated memory.master
1 changed files with 9 additions and 12 deletions
Loading…
Reference in new issue