| 21 | } |
| 22 | |
| 23 | aio_stream::~aio_stream() |
| 24 | { |
| 25 | if (hook_) { |
| 26 | hook_->destroy(); |
| 27 | } |
| 28 | |
| 29 | if (stream_) { |
| 30 | handle_->decrease(); |
| 31 | acl_aio_iocp_close(stream_); |
| 32 | } |
| 33 | |
| 34 | if (close_callbacks_) { |
| 35 | std::list<AIO_CALLBACK*>::iterator it = |
| 36 | close_callbacks_->begin(); |
| 37 | for (; it != close_callbacks_->end(); ++it) { |
| 38 | acl_myfree((*it)); |
| 39 | } |
| 40 | delete close_callbacks_; |
| 41 | } |
| 42 | |
| 43 | if (timeout_callbacks_) { |
| 44 | std::list<AIO_CALLBACK*>::iterator it = |
| 45 | timeout_callbacks_->begin(); |
| 46 | for (; it != timeout_callbacks_->end(); ++it) { |
| 47 | acl_myfree((*it)); |
| 48 | } |
| 49 | delete timeout_callbacks_; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | void aio_stream::destroy() |
| 54 | { |
nothing calls this directly
no test coverage detected