|
From: <ca...@ne...> - 2007-11-18 11:38:10
|
Hi Kentaro,
I have been bugged by that too.I had to access the bundle's internal
structure to free the messages.
I understand it's up to the instantiator of the messages to destroy them
afterwards, so I'd rather make a function like "lo_bundle_messages_free"
that you call before "lo_bundle_free" if you want to.
It would make life a bit easier!
Camille
On Nov 18, 2007 12:25 PM, Kentaro Fukuchi <fu...@me...> wrote:
> Hello,
>
> An lo_bundle object can contains multiple lo_messages, but there is no way
> to
> free those messages if you have no pointers to them after calling
> lo_bundle_add_message(). Why lo_bundle_free() does not free messages in
> it,
> just like the following?
>
> void lo_bundle_free_messages_too(lo_bundle b)
> {
> int i;
> if (!b) {
> return;
> }
> for(i = 0; i < b->len; i++) {
> lo_message_free(b->msgs[i]);
> }
>
> free(b->msgs);
> free(b->paths);
> free(b);
> }
>
> I think this function is useful. What do you think?
>
> Kentaro Fukuchi
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> liblo-devel mailing list
> lib...@li...
> https://lists.sourceforge.net/lists/listinfo/liblo-devel
>
|