|
楼主 |
发表于 2007-12-31 22:28:50
|
显示全部楼层
copy的话可以解决这个问题 但有没有更好的办法
ACE_WIN32_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
{
size_t space = message_block.space ();
if (bytes_to_read > space)
bytes_to_read = space;
if (bytes_to_read == 0)
{
errno = ENOSPC;
return -1;
}
// Create the Asynch_Result.
ACE_WIN32_Asynch_Read_Stream_Result *result = 0;
ACE_NEW_RETURN (result,
ACE_WIN32_Asynch_Read_Stream_Result (this->handler_proxy_,
this->handle_,
message_block,
bytes_to_read,
act,
this->win32_proactor_->get_handle (),
priority,
signal_number),
-1);
// Shared read
int return_val = this->shared_read (result);
// Upon errors
if (return_val == -1)
delete result;
return return_val;
}
boundercheck提示粗体那一段没有释放是什么原因?
每次都有88个字节没释放 |
|