diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-01-23 13:01:38 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-01-23 13:01:38 +0100 |
commit | 970e7c3119c2338abbe2cfbc3ad960387eb09a5d (patch) | |
tree | 366c6d906958a75af23c4a3ed31ccfb663bb43f3 /cpp/include | |
parent | Added support for Remote driver to test with already running driver (diff) | |
download | ice-970e7c3119c2338abbe2cfbc3ad960387eb09a5d.tar.bz2 ice-970e7c3119c2338abbe2cfbc3ad960387eb09a5d.tar.xz ice-970e7c3119c2338abbe2cfbc3ad960387eb09a5d.zip |
Allow self-reset for UniqueRef::reset (ICE-8612)
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/Ice/UniqueRef.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/include/Ice/UniqueRef.h b/cpp/include/Ice/UniqueRef.h index f12df19ed4f..3a2b9fcc2ba 100644 --- a/cpp/include/Ice/UniqueRef.h +++ b/cpp/include/Ice/UniqueRef.h @@ -47,7 +47,11 @@ public: void reset(R ref = 0) { - assert(ref == 0 || ref != _ref); + // + // Support "self-reset" for CF objects. This is useful if CF allocation methods return + // the same object with an increased reference count. + // + //assert(ref == 0 || ref != _ref); if(_ref != 0) { |