#include "tmpackettoread.h" TMPacketToRead::TMPacketToRead(unsigned char *Value, unsigned int size, QObject *parent) : QObject(parent) { this->Value = (unsigned char*) malloc(size); for(unsigned int i=0; iValue[i] = Value[i]; // local copy of the data pointed by Value } this->size = size; } TMPacketToRead::~TMPacketToRead() { free(this->Value); }