[Webkit-unassigned] [Bug 12103] LEAK: Fix the leaking ImageBuffer buffers on TOT

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 3 11:21:46 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12103


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12190|review?                     |review+
               Flag|                            |




------- Comment #3 from darin at apple.com  2007-01-03 11:21 PDT -------
(From update of attachment 12190)
The SVGAnimateTransformElement.cpp change seems good, but unrelated.

I'd prefer to keep to a minimum the number of new functions that return an
object that you're obliged to delete. A good way to indicate that is to use
auto_ptr<X> instead of X*. That's not so common because normally we use Shared
and RefPtr. Perhaps ImageBuffer should be Shared and then we could return a
PassRefPtr.

No need to do the if statements in ~ImageBuffer. Both CGImageRelease and
fastFree already do checks for null.

The private constructor that takes ownership of a GraphicsContext should take
an auto_ptr<GraphicsContext> parameter to indicate it takes ownership.

Also, I'd suggest that the declaration of the private constructor not be
CG_specific, even if the implementation has to be.

OwnPtr is to auto_ptr as RefPtr is to PassRefPtr.

r=me


-- 
Configure bugmail: http://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