libluna: Add OwnedPtr::leak()
This commit is contained in:
parent
9a9c7e577a
commit
54afd7c2b0
@ -49,6 +49,13 @@ template <typename T> class OwnedPtr
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
T* leak()
|
||||
{
|
||||
T* ptr = m_ptr;
|
||||
m_ptr = nullptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
T* operator->() const
|
||||
{
|
||||
return m_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user