[webkit-reviews] review granted: [Bug 12103] LEAK: Fix the leaking
ImageBuffer buffers on TOT : [Attachment 12190] the fix
bugzilla-request-daemon at macosforge.org
bugzilla-request-daemon at macosforge.org
Wed Jan 3 11:21:45 PST 2007
Darin Adler <darin at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 12103: LEAK: Fix the leaking ImageBuffer buffers on TOT
http://bugs.webkit.org/show_bug.cgi?id=12103
Attachment 12190: the fix
http://bugs.webkit.org/attachment.cgi?id=12190&action=edit
------- Additional Comments from Darin Adler <darin at apple.com>
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
More information about the webkit-reviews
mailing list