aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-06-21 15:12:50 +0000
committerMike Buland <eichlan@xagasoft.com>2010-06-21 15:12:50 +0000
commitc715b258e2d486ee4d95da7d495fd1567770fdf6 (patch)
treefaefc8713b16f763a2aee5652d8b3163b56a5688 /src
parent6778ed99fe197a05bd109eab1ec047ddcba07ca4 (diff)
downloadlibbu++-c715b258e2d486ee4d95da7d495fd1567770fdf6.tar.gz
libbu++-c715b258e2d486ee4d95da7d495fd1567770fdf6.tar.bz2
libbu++-c715b258e2d486ee4d95da7d495fd1567770fdf6.tar.xz
libbu++-c715b258e2d486ee4d95da7d495fd1567770fdf6.zip
Both Bu::Variant and Bu::MiniCron failed to cleanup behind themselves in some
cases. This has been fixed.
Diffstat (limited to 'src')
-rw-r--r--src/minicron.cpp4
-rw-r--r--src/variant.cpp5
-rw-r--r--src/variant.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/minicron.cpp b/src/minicron.cpp
index 35df189..8aace26 100644
--- a/src/minicron.cpp
+++ b/src/minicron.cpp
@@ -17,6 +17,10 @@ Bu::MiniCron::MiniCron() :
17 17
18Bu::MiniCron::~MiniCron() 18Bu::MiniCron::~MiniCron()
19{ 19{
20 while( !hJobs.isEmpty() )
21 {
22 delete hJobs.dequeue();
23 }
20} 24}
21 25
22bool Bu::MiniCron::hasJobs() 26bool Bu::MiniCron::hasJobs()
diff --git a/src/variant.cpp b/src/variant.cpp
index 9665261..6b304ba 100644
--- a/src/variant.cpp
+++ b/src/variant.cpp
@@ -36,6 +36,11 @@ Bu::Variant::Variant( const Variant &v ) :
36 36
37Bu::Variant::~Variant() 37Bu::Variant::~Variant()
38{ 38{
39 if( pCore )
40 {
41 delete pCore;
42 pCore = NULL;
43 }
39} 44}
40 45
41bool Bu::Variant::isSet() 46bool Bu::Variant::isSet()
diff --git a/src/variant.h b/src/variant.h
index 292ce56..1eda584 100644
--- a/src/variant.h
+++ b/src/variant.h
@@ -109,7 +109,7 @@ namespace Bu
109 template<class t> 109 template<class t>
110 Variant &operator=( const t &rhs ) 110 Variant &operator=( const t &rhs )
111 { 111 {
112 if( pCore && pCore->getType() != typeid(t) ) 112 if( pCore ) // && pCore->getType() != typeid(t) )
113 { 113 {
114 delete pCore; 114 delete pCore;
115 pCore = NULL; 115 pCore = NULL;