aboutsummaryrefslogtreecommitdiffstats
path: root/src/messaging/IMAPMessage.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2004-12-19 15:00:24 +0000
committerVincent Richard <[email protected]>2004-12-19 15:00:24 +0000
commitbdfcfed13ab9c9ee3b3be86424ae89b64749cc4c (patch)
treef9783966ae37dc9a3cbb5fd23af4ae80afa5a6d2 /src/messaging/IMAPMessage.cpp
parentDo not use std::remove() for removing elements from std::vector... (diff)
downloadvmime-bdfcfed13ab9c9ee3b3be86424ae89b64749cc4c.tar.gz
vmime-bdfcfed13ab9c9ee3b3be86424ae89b64749cc4c.zip
Fixed memory leaks.
Diffstat (limited to 'src/messaging/IMAPMessage.cpp')
-rw-r--r--src/messaging/IMAPMessage.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/messaging/IMAPMessage.cpp b/src/messaging/IMAPMessage.cpp
index d5ede663..36f51257 100644
--- a/src/messaging/IMAPMessage.cpp
+++ b/src/messaging/IMAPMessage.cpp
@@ -47,6 +47,8 @@ private:
public:
+ ~IMAPpart();
+
const structure& getStructure() const;
structure& getStructure();
@@ -125,6 +127,11 @@ public:
}
}
+ ~IMAPstructure()
+ {
+ free_container(m_parts);
+ }
+
const part& operator[](const int x) const
{
@@ -199,6 +206,13 @@ IMAPpart::IMAPpart(IMAPpart* parent, const int number, const IMAPParser::body_ty
}
+IMAPpart::~IMAPpart()
+{
+ delete (m_structure);
+ delete (m_header);
+}
+
+
const class structure& IMAPpart::getStructure() const
{
if (m_structure != NULL)