diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-02 20:20:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-02 20:20:47 +0000 |
commit | 8712f0c3591941711f8407fc069a1fbd98efbd65 (patch) | |
tree | c75825bc3d05f543e622770c684e09113ddbeb79 /protocols/JabberG/src | |
parent | ad5dee8e7d01ea0cd2b96a7f46e1f6fc9692825a (diff) |
added destructor LIST::~LIST, that calls destroy() automatically.
thus manual call of destroy() might be removed from:
- class destructors;
- Unload() plugin's functions (for global data);
- local (auto) variables in functions finalizations
git-svn-id: http://svn.miranda-ng.org/main/trunk@7467 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_form.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_list.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_notes.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opttree.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_treelist.cpp | 10 | ||||
-rw-r--r-- | protocols/JabberG/src/ui_utils.cpp | 3 |
11 files changed, 6 insertions, 27 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index da5465fa19..89bc5e6667 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -230,7 +230,5 @@ extern "C" int __declspec(dllexport) Unload(void) DestroyHookableEvent(hDiscoInfoResult);
g_MenuUninit();
-
- g_Instances.destroy();
return 0;
}
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 4eb225a303..d1b8abef1c 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -580,7 +580,6 @@ void JabberFormDestroyUI(HWND hwndStatic) if (controls) {
for (int i=0; i < controls->getCount(); i++)
mir_free((*controls)[i]);
- controls->destroy();
delete controls;
SetWindowLongPtr(hwndStatic, GWLP_USERDATA, 0);
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 99c00a5a18..1e91e3f71f 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -154,8 +154,6 @@ void CJabberProto::OnProcessLoginRq(ThreadData* info, DWORD rq) mir_free(nick);
}
}
-
- ll.destroy();
}
OnProcessLoginRq(info, JABBER_LOGIN_BOOKMARKS_AJ);
@@ -520,8 +518,6 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) for (i=0; i < chatRooms.getCount(); i++)
GroupchatJoinByHContact((HANDLE)chatRooms[i], true);
- chatRooms.destroy();
-
//UI_SAFE_NOTIFY(m_pDlgJabberJoinGroupchat, WM_JABBER_CHECK_ONLINE);
//UI_SAFE_NOTIFY(m_pDlgBookmarks, WM_JABBER_CHECK_ONLINE);
UI_SAFE_NOTIFY_HWND(m_hwndJabberAddBookmark, WM_JABBER_CHECK_ONLINE);
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 5f84a793cd..2151448359 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -39,7 +39,6 @@ JABBER_LIST_ITEM::~JABBER_LIST_ITEM() {
for (int i=0; i < arResources.getCount(); i++)
delete arResources[i];
- arResources.destroy();
if (m_pItemResource)
delete m_pItemResource;
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 460a4afe1d..b175ac90ed 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -514,8 +514,6 @@ private: if ( !selected)
m_tvFilter.SelectItem(htiRoot);
-
- tagSet.destroy();
}
void RebuildTree()
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp index 498c66c0b3..5490fa1aaf 100644 --- a/protocols/JabberG/src/jabber_opttree.cpp +++ b/protocols/JabberG/src/jabber_opttree.cpp @@ -38,7 +38,6 @@ CCtrlTreeOpts::~CCtrlTreeOpts() {
for (int i=0; i < m_options.getCount(); i++)
delete m_options[i];
- m_options.destroy();
}
void CCtrlTreeOpts::AddOption(TCHAR *szOption, CMOption<BYTE> &option)
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index a70c6de060..5504d2689e 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -650,7 +650,6 @@ protected: mir_free(newJids[i]->jid);
mir_free(newJids[i]);
}
- newJids.destroy();
}
void addJid(HANDLE hItem, TCHAR *jid)
@@ -2112,6 +2111,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) if (bDeleteOld)
for (int i=0; i < m_hPrivacyMenuItems.getCount(); i++)
CallService(MO_REMOVEMENUITEM, (WPARAM)m_hPrivacyMenuItems[i], 0);
+
m_hPrivacyMenuItems.destroy();
mir_cslock lck(m_privacyListManager.m_cs);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index c47cf3eb90..f73fe0cb0d 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -195,7 +195,6 @@ CJabberProto::~CJabberProto() int i;
for (i=0; i < m_lstTransports.getCount(); i++)
mir_free(m_lstTransports[i]);
- m_lstTransports.destroy();
for (i=0; i < m_lstJabberFeatCapPairsDynamic.getCount(); i++) {
mir_free(m_lstJabberFeatCapPairsDynamic[i]->szExt);
@@ -203,8 +202,6 @@ CJabberProto::~CJabberProto() mir_free(m_lstJabberFeatCapPairsDynamic[i]->szDescription);
delete m_lstJabberFeatCapPairsDynamic[i];
}
- m_lstJabberFeatCapPairsDynamic.destroy();
- m_hPrivacyMenuItems.destroy();
}
////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index b81521b2e6..0dfac49aec 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -180,11 +180,9 @@ void ThreadData::xmpp_client_query(void) port = dnsPort;
break;
} }
- dnsList.destroy();
DnsRecordListFree(results, DnsFreeRecordList);
}
- else
- proto->debugLogA("%s not resolved", temp);
+ else proto->debugLogA("%s not resolved", temp);
}
void CJabberProto::xmlStreamInitialize(char *szWhich)
diff --git a/protocols/JabberG/src/jabber_treelist.cpp b/protocols/JabberG/src/jabber_treelist.cpp index 60b9e92089..9fc000cf3f 100644 --- a/protocols/JabberG/src/jabber_treelist.cpp +++ b/protocols/JabberG/src/jabber_treelist.cpp @@ -49,13 +49,11 @@ struct TTreeList_ItemInfo flags(0), indent(0), sortIndex(0), iIcon(0), iOverlay(0), data(0) {}
~TTreeList_ItemInfo()
{
- int i;
- for (i = text.getCount(); i--;)
+ for (int i = text.getCount(); i--;)
mir_free(text[i]);
- text.destroy();
- for (i = subItems.getCount(); i--;)
- delete subItems[i];
- subItems.destroy();
+
+ for (int k = subItems.getCount(); k--;)
+ delete subItems[k];
}
};
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp index a25002b95b..77cbe4ae78 100644 --- a/protocols/JabberG/src/ui_utils.cpp +++ b/protocols/JabberG/src/ui_utils.cpp @@ -39,9 +39,6 @@ CDlgBase::CDlgBase(int idDialog, HWND hwndParent) : CDlgBase::~CDlgBase()
{
- // remove handlers
- m_controls.destroy();
-
if (m_hwnd)
DestroyWindow(m_hwnd);
}
|