summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Sdk
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-14 14:33:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-14 14:33:17 +0000
commit56ecec5734194ccf709c3f57fe1a15a1b926c68d (patch)
treece049dc932a37e32a1e8810a70562d2b0a32d9df /protocols/MRA/src/Sdk
parentffe922189b20daaf132ddfc24bfea9bf03a3a94b (diff)
let's operator new() clean the memory
git-svn-id: http://svn.miranda-ng.org/main/trunk@11406 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Sdk')
-rw-r--r--protocols/MRA/src/Sdk/ListMT.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/protocols/MRA/src/Sdk/ListMT.h b/protocols/MRA/src/Sdk/ListMT.h
index 399765fba2..d87173b227 100644
--- a/protocols/MRA/src/Sdk/ListMT.h
+++ b/protocols/MRA/src/Sdk/ListMT.h
@@ -55,7 +55,7 @@ typedef CONST PLIST_MT_ITEM PCLIST_MT_ITEM, LPCLIST_MT_ITEM;
// структура для работы со списком, заголовок списка
-typedef struct _LIST_MT
+typedef struct _LIST_MT : public MZeroedObject
{
size_t nCount; // *количество элементов в списке
PLIST_MT_ITEM plmtiFirst; // *указывает на первый элемент в списке
@@ -74,26 +74,6 @@ typedef struct _LIST_MT_ITERATOR
typedef CONST PLIST_MT_ITERATOR PCLIST_MT_ITERATOR, LPCLIST_MT_ITERATOR;
-
-
-__inline DWORD ListMTInitialize(PCLIST_MT pclmtListMT)
-{
- InterlockedExchangePointer((volatile PVOID*)&pclmtListMT->nCount,NULL);
- pclmtListMT->plmtiFirst=NULL;
- pclmtListMT->plmtiLast=NULL;
- return NO_ERROR;
-}
-
-
-__inline void ListMTDestroy(PCLIST_MT pclmtListMT)
-{
- InterlockedExchangePointer((volatile PVOID*)&pclmtListMT->nCount,NULL);
- pclmtListMT->plmtiFirst=NULL;
- pclmtListMT->plmtiLast=NULL;
- SecureZeroMemory(&pclmtListMT->cs,sizeof(CRITICAL_SECTION));
-}
-
-
__inline size_t ListMTGetCount(PCLIST_MT pclmtListMT)
{
return((size_t)InterlockedCompareExchangePointer((LPVOID*)&pclmtListMT->nCount,NULL,NULL));