- Removed not used members from RsGenExchange and p3IdService

- Fixed memory leaks in p3PostBase

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7425 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-07-03 21:49:17 +00:00
parent 2785094c97
commit b85459ee02
3 changed files with 45 additions and 41 deletions

View file

@ -526,30 +526,30 @@ protected:
* Ownership of item passes to this rsgenexchange \n * Ownership of item passes to this rsgenexchange \n
* @param token * @param token
* @param grpItem * @param grpItem
*/ */
void publishGroup(uint32_t& token, RsGxsGrpItem* grpItem); void publishGroup(uint32_t& token, RsGxsGrpItem* grpItem);
/*! /*!
* Updates an existing group item \n * Updates an existing group item \n
* This will induce a related change message \n * This will induce a related change message \n
* Ownership of item passes to this rsgenexchange \n * Ownership of item passes to this rsgenexchange \n
* @param token * @param token
* @param grpItem * @param grpItem
*/ */
void updateGroup(uint32_t& token, RsGxsGrpItem* grpItem); void updateGroup(uint32_t& token, RsGxsGrpItem* grpItem);
/*! /*!
* Deletes an existing group item \n * Deletes an existing group item \n
* This will induce a related change message \n * This will induce a related change message \n
* Ownership of item passes to this rsgenexchange \n * Ownership of item passes to this rsgenexchange \n
* @param token * @param token
* @param grpItem * @param grpItem
*/ */
void deleteGroup(uint32_t& token, RsGxsGrpItem* grpItem); void deleteGroup(uint32_t& token, RsGxsGrpItem* grpItem);
public: public:
/*! /*!
* Enables publication of a message item \n * Enables publication of a message item \n
* Setting mOrigMsgId meta member to blank \n * Setting mOrigMsgId meta member to blank \n
* leads to this msg being an original msg \n * leads to this msg being an original msg \n
* if mOrigMsgId is not blank the msgId then this msg is \n * if mOrigMsgId is not blank the msgId then this msg is \n
@ -659,14 +659,14 @@ private:
void processRecvdGroups(); void processRecvdGroups();
void publishGrps(); void publishGrps();
void processGroupUpdatePublish(); void processGroupUpdatePublish();
void processGroupDelete(); void processGroupDelete();
void publishMsgs(); void publishMsgs();
/*! /*!
* processes msg local meta changes * processes msg local meta changes
*/ */
void processMsgMetaChanges(); void processMsgMetaChanges();
@ -863,7 +863,6 @@ private:
private: private:
std::vector<RsGxsNotify*> mChanges;
std::vector<RsGxsGroupChange*> mGroupChange; std::vector<RsGxsGroupChange*> mGroupChange;
std::vector<RsGxsMsgChange*> mMsgChange; std::vector<RsGxsMsgChange*> mMsgChange;
@ -874,11 +873,11 @@ private:
private: private:
std::vector<GroupUpdate> mGroupUpdates, mPeersGroupUpdate; std::vector<GroupUpdate> mGroupUpdates, mPeersGroupUpdate;
std::vector<GroupUpdatePublish> mGroupUpdatePublish; std::vector<GroupUpdatePublish> mGroupUpdatePublish;
std::vector<GroupDeletePublish> mGroupDeletePublish; std::vector<GroupDeletePublish> mGroupDeletePublish;
}; };
#endif // RSGENEXCHANGE_H #endif // RSGENEXCHANGE_H

View file

@ -476,9 +476,6 @@ std::string genRandomId(int len = 20);
* Other Data that is protected by the Mutex. * Other Data that is protected by the Mutex.
*/ */
std::vector<RsGxsGroupChange*> mGroupChange;
std::vector<RsGxsMsgChange*> mMsgChange;
private: private:
std::map<uint32_t, std::set<RsGxsGroupId> > mIdsPendingCache; std::map<uint32_t, std::set<RsGxsGroupId> > mIdsPendingCache;

View file

@ -534,6 +534,10 @@ void p3PostBase::background_loadMsgs(const uint32_t &token, bool unprocessed)
changes.push_back(msgChanges); changes.push_back(msgChanges);
receiveHelperChanges(changes); receiveHelperChanges(changes);
} }
else
{
delete(msgChanges);
}
/* request the summary info from the parents */ /* request the summary info from the parents */
uint32_t token_b; uint32_t token_b;
@ -669,6 +673,10 @@ void p3PostBase::background_updateVoteCounts(const uint32_t &token)
changes.push_back(msgChanges); changes.push_back(msgChanges);
receiveHelperChanges(changes); receiveHelperChanges(changes);
} }
else
{
delete(msgChanges);
}
// DONE!. // DONE!.
background_cleanup(); background_cleanup();