From: Zhu, H. <Hu...@ar...> - 2008-09-30 18:43:04
|
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 |