mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-13 09:03:33 -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 setRSAPublicKey(RsTlvSecurityKey &key, RSA *rsa_pub);
|
||||||
void setRSAPrivateKey(RsTlvSecurityKey &key, RSA *rsa_priv);
|
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,
|
p3GroupDistrib::p3GroupDistrib(uint16_t subtype,
|
||||||
CacheStrapper *cs, CacheTransfer *cft,
|
CacheStrapper *cs, CacheTransfer *cft,
|
||||||
|
@ -88,6 +97,14 @@ p3GroupDistrib::p3GroupDistrib(uint16_t subtype,
|
||||||
return;
|
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()
|
int p3GroupDistrib::tick()
|
||||||
{
|
{
|
||||||
|
|
|
@ -169,6 +169,7 @@ class GroupInfo
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
virtual ~GroupInfo() ;
|
||||||
|
|
||||||
std::string grpId; /// the group id
|
std::string grpId; /// the group id
|
||||||
RsDistribGrp *distribGroup; /// item which contains further information on group
|
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 configId,
|
||||||
uint32_t storePeriod, uint32_t pubPeriod);
|
uint32_t storePeriod, uint32_t pubPeriod);
|
||||||
|
|
||||||
|
virtual ~p3GroupDistrib() ;
|
||||||
|
|
||||||
/***************************************************************************************/
|
/***************************************************************************************/
|
||||||
/******************************* CACHE SOURCE / STORE Interface ************************/
|
/******************************* CACHE SOURCE / STORE Interface ************************/
|
||||||
|
|
|
@ -63,6 +63,12 @@ NetworkView::NetworkView(QWidget *parent)
|
||||||
_should_update = true ;
|
_should_update = true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetworkView::~NetworkView()
|
||||||
|
{
|
||||||
|
if(mScene != NULL)
|
||||||
|
delete mScene ;
|
||||||
|
}
|
||||||
|
|
||||||
void NetworkView::setEdgeLength(int l)
|
void NetworkView::setEdgeLength(int l)
|
||||||
{
|
{
|
||||||
ui.graphicsView->setEdgeLength(l);
|
ui.graphicsView->setEdgeLength(l);
|
||||||
|
|
|
@ -34,6 +34,7 @@ class NetworkView : public RsAutoUpdatePage
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NetworkView(QWidget *parent = 0);
|
NetworkView(QWidget *parent = 0);
|
||||||
|
virtual ~NetworkView();
|
||||||
|
|
||||||
virtual void updateDisplay() ; // derived from RsAutoUpdatePage
|
virtual void updateDisplay() ; // derived from RsAutoUpdatePage
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue