[zeromq-dev] [PATCH]

Martin Sustrik sustrik at moloch.sk
Mon Oct 11 09:56:23 CEST 2010


Hi Daniel,
>>           if (!write (pipes [i], msg_))
>> -            content->refcnt.sub (1);
>> +            passivised++;
>>           else
>>               i++;
>>      
> I think the problem comes from a useless  reference subtraction in the
> first test case, since you subtract all the passivised in a second time.
>    
Note that the second line in the patch above is *removed*. Have you 
applied the patch by hand?

> I tried the following and it works well with no leak in my video
> distribution test:
>
>   //  Push the message to all destinations.
>      int passivised = 0;
>      for (pipes_t::size_type i = 0; i != active;) {
>        if (!write (pipes [i], msg_) )
>      passivised++;
>        else
>      i++;
>      }
>    
Yes. That's how it should look like.

I am going to apply the patch.

Thanks!
Martin



More information about the zeromq-dev mailing list