[Webkit-unassigned] [Bug 20935] refptr alone is insufficient to ensure references to objects stay around long enough

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 20 22:07:16 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20935


mrowe at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrowe at apple.com




------- Comment #1 from mrowe at apple.com  2008-09-20 22:07 PDT -------
The lifetime and ownership of Document and Frame are not as clear as we would
like, but their approach to refcounting is not incorrect.  In particular, your
suggestion that their ref and deref members should increment/decrement the
refcounts of their members does not mesh at all with how refcounting works.

If an object intends wants to keep alive an object that it has a reference to
(eg, keep a strong reference), it will use a RefPtr to keep track of that
member.  If it does not wish to keep it alive, or knows the object to which it
refers *must* outlive it, it will use a bare pointer (eg, a weak reference).

There are clearly some ownership and lifetime issues in the GTK code that are
leading to the issues mentioned in bug 20403, but RefCounted being insufficient
isn't the problem.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list