On 9/1/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote: > On Mon, Sep 1, 2008 at 9:24 AM, Stefano Sabatini <[EMAIL PROTECTED]> wrote: >> On Fri, Aug 29, 2008 at 5:27 PM, <[EMAIL PROTECTED]> wrote: [...] >>>>Hi all sofia-sippers, >>>> >>>>I'm looking for the best method to free an sdp_session_t struct. >>>> >>>>I see there is an sdp_session_dup() function, and there are >>>>sdp_printer_free() and sdp_parser_free(), so I was expecting some >>>>method such as sdp_session_free(). >>>> >>>>Missing that, then I wonder if its absence means something, for >>>>example that there is some convenient method to free an sdp_session_t. >>>> >>>>Can you give some hint? >>> >>> Free the home used for allocating the session. >> >> Hi, and thanks for the reply. >> Yes that's a solution, nonetheless it looks still weird to me, to have >> to use an home just for that seems >> overkill. > > There is also this problem. Assuming that I have to pass around the > allocated home, I can't use a stack allocated home, so I > have to use su_home_new() (here choosing an arbitrary size value...). > > Then I think there is no way to know the home used by an sdp_session_t > object, so I would have to pass around the home > object to which the sdp_session_t is bound, which is pretty awkward, > *either* to have a memleak.
Another solution could be to pass around sdp_parser_t rather than sdp_session_t, then use sdp_session() to get the sdp_session_t from the parser and free both parser and session with sdp_parser_free(), do you think this is an acceptable solution? But still this looks like a strange solution and not particularly convenient (why to pass around the whole parser if what I need is just the session?), and is the reason for which I was looking for an sdp_session_free() function. [...] Regards. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel