Use shared_ptr to manage io_data_t*.

This commit is contained in:
Cheer Xiao
2012-12-31 23:54:17 +08:00
parent 1ae0e5d7cb
commit a9ada13a23
7 changed files with 80 additions and 82 deletions

View File

@@ -869,7 +869,7 @@ static int select_try(job_t *j)
for (size_t idx = 0; idx < j->io.size(); idx++)
{
const io_data_t *d = j->io.at(idx);
const io_data_t *d = j->io.at(idx).get();
if (d->io_mode == IO_BUFFER)
{
int fd = d->param1.pipe_fd[0];
@@ -909,7 +909,7 @@ static void read_try(job_t *j)
*/
for (size_t idx = 0; idx < j->io.size(); idx++)
{
io_data_t *d = j->io.at(idx);
io_data_t *d = j->io.at(idx).get();
if (d->io_mode == IO_BUFFER)
{
buff=d;