Constructor. Arguments are the block size and (optionally) the pointer to the function which will be called if allocation failed; the message passed to this function is "Not enough memory!" */
| 207 | will be called if allocation failed; the message |
| 208 | passed to this function is "Not enough memory!" */ |
| 209 | DBlock(int size, void (*err_function)(char *) = NULL) { first = NULL; first_free = NULL; block_size = size; error_function = err_function; } |
| 210 | |
| 211 | /* Destructor. Deallocates all items added so far */ |
| 212 | ~DBlock() { while (first) { block *next = first -> next; delete[] ((char*)first); first = next; } } |
nothing calls this directly
no outgoing calls
no test coverage detected