> But in cases like the SharedBuffer one, there is no mystery about who
> allocated the memory. The mystery is typically who is holding on to a
> reference to it.

I have a technique to capture ref/deref problems with gdb. When the object
is created (inside the object constructor), I just put a write break point
to the address of m_refCount: "watch this->m_refCount" in gdb. The
backtrace can be inspected every time when this watch point is hit. Ref /
derefs must be in pairs, usually easy to find which ref has no deref pair.
Gdb also supports executing scripts when a breakpoint is hit, this could
be useful to perform some tasks (see the COMMAND command).

Zoltan


_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to