1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:57:36 +00:00

Start using WeakPtr for some of the WindowManager window pointers.

This commit is contained in:
Andreas Kling 2018-10-13 17:00:45 +02:00
parent 16fff6dff7
commit 560405667e
5 changed files with 29 additions and 8 deletions

View file

@ -2,6 +2,7 @@
#include "Assertions.h"
#include "Retainable.h"
#include "RetainPtr.h"
namespace AK {
@ -16,8 +17,8 @@ public:
const T* ptr() const { return static_cast<const T*>(m_ptr); }
private:
explicit WeakLink(Weakable<T>& weakable) : m_ptr(&weakable) { }
Weakable<T>* m_ptr;
explicit WeakLink(T& weakable) : m_ptr(&weakable) { }
T* m_ptr;
};
template<typename T>