[openamq-dev] Reuse of a basic_content object?

Martin Sustrik sustrik at imatix.com
Sat Nov 10 08:40:47 CET 2007


Unlink drops the reference to a reference-counted object. If you don't 
unlink the object, you'll get memory leak.

Martin

Elli Barasch wrote:
> Thanks.  What does basic_unlink do?  Is it mandatory?
> 
> Elli
> 
> Martin Sustrik wrote:
>> Elli,
>>
>>> Is this code snippet valid? Assuming that I do not destroy the 
>>> incoming content object, can I simply forward incoming content w/o
>>> creating a new outbound content object?
>>
>> Yes, that kind of usage is perfectly valid. Attached is test program 
>> exhibiting the behaviour.
>>
>> Martin
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> openamq-dev mailing list
>> openamq-dev at lists.openamq.org
>> http://lists.openamq.org/mailman/listinfo/openamq-dev
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev



More information about the openamq-dev mailing list