[webkit-dev] Protecting against stale pointers in DrawingBuffer and GraphicsContext3D
darin at apple.com
Tue Oct 12 10:44:33 PDT 2010
On Oct 12, 2010, at 9:47 AM, Chris Marrin wrote:
> But refcounting is simpler and my current patch has a clear() method on DrawingBuffer which gets rid of all the resources. I could leave that method and change to a refcounted model, so the author can control when the resources are destroyed.
> What do you think, James?
I think that the combination of reference counting and explicit cleanup is a good one, relatively easy to program correctly with, and I would lean toward that combination.
The main cost of successfully implementing that design is making sure that each function on DrawingBuffer is either harmless to call after clear() or contains an assertion that it is not called after clear() with some solid reason to know it won’t be called.
More information about the webkit-dev