summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-30 17:49:20 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:13:53 +0100
commit582e89610b366c0d887baa6b8de7fa5f065900fa (patch)
tree91f3b723d1485b5616d457e30011fa55914785a4 /include/rtl
parent49dadad0b55f879ebe5daf539a97043d283ad0a8 (diff)
vclptr: create Instance helpers, and set initial ref-count to 1.
Document that in README.lifecycle; the problem is that our constructors currently take and release references left/right on the object being created, which ... means we need an initial reference. Change-Id: I5de952b73ac67888c3fbb150d4a7cde2a7bc9abf
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/ref.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/rtl/ref.hxx b/include/rtl/ref.hxx
index 942923ad6819..097584b1a276 100644
--- a/include/rtl/ref.hxx
+++ b/include/rtl/ref.hxx
@@ -49,6 +49,13 @@ public:
/** Constructor...
*/
+ inline Reference (reference_type * pBody, __sal_NoAcquire)
+ : m_pBody (pBody)
+ {
+ }
+
+ /** Constructor...
+ */
inline Reference (reference_type * pBody)
: m_pBody (pBody)
{
@@ -56,7 +63,6 @@ public:
m_pBody->acquire();
}
-
/** Copy constructor...
*/
inline Reference (const Reference<reference_type> & handle)