Ask Your Question

Revision history [back]

In deserialize_task, you create the IStream on the local variable buffer, not the parameter my_buffer that contains the actual serialized data. Also, I would pass the buffer size used for serialization to deserialize_task. A freshly generated empty message object might require less memory than a filled message.

In deserialize_task, you create the IStream on the local variable buffer, not the parameter my_buffer that contains the actual serialized data. Also, I would pass the buffer size used for serialization to deserialize_task. A freshly generated empty message object might require less memory than a filled message.message so using the message length of the newly created message might be wrong.