removed aliasing in storeMessages/storeGroups, removed several memory leaks in unittests, improved auto-delete structures in rsgxsutil, added deletion for members of RsGenExchange, removed shared pointers from unittests (they cause a memory leak and are only used in unittests)

This commit is contained in:
csoler 2017-07-25 00:07:53 +02:00
parent ef24459c5e
commit 461ccf3b84
21 changed files with 281 additions and 275 deletions

View file

@ -104,7 +104,7 @@ void init_item(RsChatAvatarItem& cai)
{
std::string image_data;
randString(LARGE_STR, image_data);
cai.image_data = new unsigned char[image_data.size()];
cai.image_data = (unsigned char*)malloc(image_data.size());
memcpy(cai.image_data, image_data.c_str(), image_data.size());
cai.image_size = image_data.size();