From eea43ec1441fea198da61eda75c5714956a20524 Mon Sep 17 00:00:00 2001 From: Savio Sena Date: Mon, 15 Sep 2014 18:53:27 -0300 Subject: [PATCH] eo-cxx: Added _reset() to efl::eo::base. --- src/bindings/eo_cxx/eo_base.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bindings/eo_cxx/eo_base.hh b/src/bindings/eo_cxx/eo_base.hh index 70052d0cc6..015fd51b9e 100644 --- a/src/bindings/eo_cxx/eo_base.hh +++ b/src/bindings/eo_cxx/eo_base.hh @@ -105,7 +105,16 @@ struct base _eo_raw = nullptr; return tmp; } - + + /// @brief Reset the current pointer to reference a new Eo object. + /// + void _reset(Eo* _ptr = nullptr) + { + if(_eo_raw) + detail::unref(_eo_raw); + _eo_raw = _ptr; + } + /// @brief Get the reference count of this object. /// /// @return The referencer count of this object.