diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-09 22:02:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 22:02:52 +0200 |
commit | a4b829410c74aac4bb2c6df9f0446c3826278be7 (patch) | |
tree | 856087d60bc70fd64a8ac0fac70825c48efa9d33 /core | |
parent | b61a496aa7d8eee0bb5505bf99ae9e8f447b9c0d (diff) | |
parent | 46bfe4452f44d0264346227abc3431c76ee717dc (diff) |
Merge pull request #38481 from RandomShaper/improve_yield
Fix object leaks caused by unfulfilled yields
Diffstat (limited to 'core')
-rw-r--r-- | core/self_list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/self_list.h b/core/self_list.h index 19d2783208..43aeb44fea 100644 --- a/core/self_list.h +++ b/core/self_list.h @@ -120,6 +120,9 @@ private: public: _FORCE_INLINE_ bool in_list() const { return _root; } + _FORCE_INLINE_ void remove_from_list() { + if (_root) _root->remove(this); + } _FORCE_INLINE_ SelfList<T> *next() { return _next; } _FORCE_INLINE_ SelfList<T> *prev() { return _prev; } _FORCE_INLINE_ const SelfList<T> *next() const { return _next; } |