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:
csoler 2011-03-05 18:26:33 +00:00
parent e72155c9dc
commit 1027621e07
4 changed files with 26 additions and 0 deletions

View File

@ -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()
{

View File

@ -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 ************************/

View File

@ -63,6 +63,12 @@ NetworkView::NetworkView(QWidget *parent)
_should_update = true ;
}
NetworkView::~NetworkView()
{
if(mScene != NULL)
delete mScene ;
}
void NetworkView::setEdgeLength(int l)
{
ui.graphicsView->setEdgeLength(l);

View File

@ -34,6 +34,7 @@ class NetworkView : public RsAutoUpdatePage
public:
NetworkView(QWidget *parent = 0);
virtual ~NetworkView();
virtual void updateDisplay() ; // derived from RsAutoUpdatePage