eo-cxx: Added _reset() to efl::eo::base.

This commit is contained in:
Savio Sena 2014-09-15 18:53:27 -03:00
parent 42a97a98c2
commit eea43ec144
1 changed files with 10 additions and 1 deletions

View File

@ -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.