mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
added missign destructors, causing some parasitic memory leaks
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4079 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e72155c9dc
commit
1027621e07
4 changed files with 26 additions and 0 deletions
|
@ -60,7 +60,16 @@ RSA *extractPrivateKey(RsTlvSecurityKey &key);
|
|||
void setRSAPublicKey(RsTlvSecurityKey &key, RSA *rsa_pub);
|
||||
void setRSAPrivateKey(RsTlvSecurityKey &key, RSA *rsa_priv);
|
||||
|
||||
GroupInfo::~GroupInfo()
|
||||
{
|
||||
delete distribGroup ;
|
||||
|
||||
for(std::map<std::string, RsDistribMsg *>::const_iterator it(msgs.begin());it!=msgs.end();++it)
|
||||
delete it->second ;
|
||||
|
||||
for(std::map<std::string, RsDistribMsg *>::const_iterator it(decrypted_msg_cache.begin());it!=decrypted_msg_cache.end();++it)
|
||||
delete it->second ;
|
||||
}
|
||||
|
||||
p3GroupDistrib::p3GroupDistrib(uint16_t subtype,
|
||||
CacheStrapper *cs, CacheTransfer *cft,
|
||||
|
@ -88,6 +97,14 @@ p3GroupDistrib::p3GroupDistrib(uint16_t subtype,
|
|||
return;
|
||||
}
|
||||
|
||||
p3GroupDistrib::~p3GroupDistrib()
|
||||
{
|
||||
for(std::map<std::string, RsDistribGrpKey* >::iterator it(mRecvdPubKeys.begin());it!=mRecvdPubKeys.end();++it)
|
||||
delete it->second ;
|
||||
|
||||
for(std::list<RsDistribSignedMsg*>::iterator it(mPendingPublish.begin());it!=mPendingPublish.end();++it)
|
||||
delete *it ;
|
||||
}
|
||||
|
||||
int p3GroupDistrib::tick()
|
||||
{
|
||||
|
|
|
@ -169,6 +169,7 @@ class GroupInfo
|
|||
{
|
||||
return;
|
||||
}
|
||||
virtual ~GroupInfo() ;
|
||||
|
||||
std::string grpId; /// the group id
|
||||
RsDistribGrp *distribGroup; /// item which contains further information on group
|
||||
|
@ -297,6 +298,7 @@ class p3GroupDistrib: public CacheSource, public CacheStore, public p3Config, pu
|
|||
uint32_t configId,
|
||||
uint32_t storePeriod, uint32_t pubPeriod);
|
||||
|
||||
virtual ~p3GroupDistrib() ;
|
||||
|
||||
/***************************************************************************************/
|
||||
/******************************* CACHE SOURCE / STORE Interface ************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue