summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjian liang <jianliang79@gmail.com>2013-05-18 18:08:40 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-20 10:06:04 +0200
commit403c46b9b72eaefb7abacc691da591c3f33d9857 (patch)
tree16b53c7c063d44992c40cdf994c8c6d9d2227909
parentb8673b8468e997c687450c664e97098d0ed37abf (diff)
Fix QLocalePrivate object leaking
Set ref count to zero in QLocalePrivate::create() to avoid QLocalePrivate object leaking. Change-Id: I8948c27d59b2038266ab04c6113610b9b4481b45 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--src/corelib/tools/qlocale_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index cbb07331ab..56ed6c7534 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -215,7 +215,7 @@ public:
{
QLocalePrivate *retval = new QLocalePrivate;
retval->m_data = data;
- retval->ref.store(1);
+ retval->ref.store(0);
retval->m_numberOptions = numberOptions;
return retval;
}