diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:40 +0300 |
commit | 5d50718e66d9c037dc587a0211110b7d25a66185 (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /util/generic/ptr.h | |
parent | a6a92afe03e02795227d2641b49819b687f088f8 (diff) | |
download | ydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r-- | util/generic/ptr.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h index 2ef6a9ad72..19db0e3ec5 100644 --- a/util/generic/ptr.h +++ b/util/generic/ptr.h @@ -411,37 +411,37 @@ private: C Counter_; }; -/** - * Atomically reference-counted base with a virtual destructor. - * - * @note Plays well with inheritance, should be used for refcounted base classes. - */ +/** + * Atomically reference-counted base with a virtual destructor. + * + * @note Plays well with inheritance, should be used for refcounted base classes. + */ struct TThrRefBase: public TRefCounted<TThrRefBase, TAtomicCounter> { virtual ~TThrRefBase(); }; -/** - * Atomically reference-counted base. - * - * Deletes refcounted object as type T. - * - * @warning Additional care should be taken with regard to inheritance. If used - * as a base class, @p T should either declare a virtual destructor, or be +/** + * Atomically reference-counted base. + * + * Deletes refcounted object as type T. + * + * @warning Additional care should be taken with regard to inheritance. If used + * as a base class, @p T should either declare a virtual destructor, or be * derived from @p TThrRefBase instead. Otherwise, only destructor of class @p T - * would be called, potentially slicing the object and creating memory leaks. - * - * @note To avoid accidental inheritance when it is not originally intended, - * class @p T should be marked as final. - */ + * would be called, potentially slicing the object and creating memory leaks. + * + * @note To avoid accidental inheritance when it is not originally intended, + * class @p T should be marked as final. + */ template <class T, class D = TDelete> using TAtomicRefCount = TRefCounted<T, TAtomicCounter, D>; -/** - * Non-atomically reference-counted base. - * - * @warning Not thread-safe. Use with great care. If in doubt, use @p ThrRefBase - * or @p TAtomicRefCount instead. - */ +/** + * Non-atomically reference-counted base. + * + * @warning Not thread-safe. Use with great care. If in doubt, use @p ThrRefBase + * or @p TAtomicRefCount instead. + */ template <class T, class D = TDelete> using TSimpleRefCount = TRefCounted<T, TSimpleCounter, D>; |