From e9501b48d86d3c450ac4cbd9b1726d0d22b21784 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 29 Mar 2006 20:06:39 +0000 Subject: Refactored and cleaned up smart pointers. --- src/bodyPart.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/bodyPart.cpp') diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp index 6903adb2..6d686f9b 100644 --- a/src/bodyPart.cpp +++ b/src/bodyPart.cpp @@ -33,7 +33,7 @@ bodyPart::bodyPart() m_body(vmime::create ()), m_parent(NULL) { - m_body->setParentPart(this); + m_body->setParentPart(thisRef().dynamicCast ()); } @@ -121,9 +121,15 @@ ref bodyPart::getBody() } -weak_ref bodyPart::getParentPart() const +ref bodyPart::getParentPart() { - return (m_parent); + return m_parent.acquire(); +} + + +ref bodyPart::getParentPart() const +{ + return m_parent.acquire(); } -- cgit v1.2.3