summaryrefslogtreecommitdiff
path: root/AK/WeakPtr.h
AgeCommit message (Collapse)Author
2020-01-25AK: Assert if trying to create a WeakPtr to an object being destroyedAndreas Kling
Trying to make_weak_ptr() on something that has begun destruction is very unlikely to be what you want. Let's assert if that scenario comes up so we can catch it immediately.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-11-15AK: Fix leak in WeakPtr(WeakPtr&&) and WeakPtr::operator=(WeakPtr&&)Andreas Kling
We were forgetting to adopt the WeakLink, causing a reference leak. This ended up costing us one allocation per exec(), with this stack: kmalloc_impl() Inode::set_vmo() InodeVMObject::create_with_inode() Process::do_exec() Process::exec() Process::sys$execve() This was a pain to track down, in the end I caught it by dumping out every live kmalloc pointer between runs and diffing the sets. Then it was just a matter of matching the pointer to a call stack and looking at what went wrong. :^)
2019-07-11AK: Remove use of copy_ref().Andreas Kling
2019-07-04AK: Move some of LogStream out of line & add overloads for smart pointers.Andreas Kling
2019-06-21AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.Andreas Kling
2019-05-28Add clang-format fileRobin Burchell
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
2019-04-17WindowServer: Mouse switching between system menu and app menu was broken.Andreas Kling
2019-04-14AK: Add WeakPtr::operator T*() for ergonomy.Andreas Kling
2019-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2019-01-13Add basic GUI API for creating labels and buttons.Andreas Kling
2019-01-09Start refactoring graphics system to have per-window backing stores.Andreas Kling
It was fun for everyone to share a single framebuffer but it was also kinda really awful. Let's move towards having a "GraphicsBitmap" as the backing store for each Window. This is going to need a lot of refactoring so let's get started.
2018-12-21Yet another pass of style fixes.Andreas Kling
2018-10-13Start using WeakPtr for some of the WindowManager window pointers.Andreas Kling
2018-10-13Add WeakPtr/Weakable templates.Andreas Kling