From: Toby C. <tco...@pl...> - 2008-09-30 19:19:12
|
You will need to free the data, and you do not need to wait at all, by the time SendCmd returns the data has been finished with. Toby 2008/10/1 Zhu, Hua <Hu...@ar...> > Hello, > > I have question about sending command to OpaqueProxy. The sample code is > shown below. > > player_opaque_data_t cmd; > cmd.data_count = 9; > cmd.data = new uint8_t[9]; > cmd.data[0] = ... > ... > cmd.data[8] = ... > pOpaqueProxy->SendCmd(&cmd); > > delete [] cmd.data; // *** will it cause memory leak if this line is > commented out? > > I'm wondering if cmd.data will be released somewhere else (such as in > player_opaque_data_pack()??) or I need to release it here? > > If I need to release it by myself, do I need to wait/sleep a while before > delete it? > > Thanks for your help, > -Hua > > ------------------------------------------------------------------------- > 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=/ > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > -- This email is intended for the addressee only and may contain privileged and/or confidential information |