RESOLVED FIXED 20532
Memory leaks when animating transforms
https://bugs.webkit.org/show_bug.cgi?id=20532
Summary Memory leaks when animating transforms
Chris Marrin
Reported 2008-08-26 17:25:09 PDT
All the subclasses of TransformOperation::blend() return objects that have been created using new. This object is never deleted, so always leaks. Attached is a simple test case which shows the problem. Run it, then close the Safari window, run leaks on the Safari process and you will see the leaks in WebCore::RotateTransformOperation. Note, there's also a leak in NSCFString, but that's unrelated.
Attachments
testcase showing memory leak (861 bytes, text/html)
2008-08-26 17:30 PDT, Chris Marrin
no flags
Patch to fix bug (9.02 KB, patch)
2008-08-27 11:43 PDT, Chris Marrin
hyatt: review+
Chris Marrin
Comment 1 2008-08-26 17:30:52 PDT
Created attachment 23009 [details] testcase showing memory leak
Chris Marrin
Comment 2 2008-08-27 11:43:19 PDT
Created attachment 23033 [details] Patch to fix bug
Eric Seidel (no email)
Comment 3 2008-08-27 15:37:37 PDT
Comment on attachment 23033 [details] Patch to fix bug Seems the associated constructors should be made private to prevent this in the future.
Simon Fraser (smfr)
Comment 4 2008-08-27 15:48:38 PDT
Eric: they are private already, e.g. http://trac.webkit.org/browser/trunk/WebCore/rendering/style/RenderStyle.h#L843 The code was calling 'new' from inside transform operations methods, so a constructor call was allowed.
Dave Hyatt
Comment 5 2008-08-27 15:51:07 PDT
Comment on attachment 23033 [details] Patch to fix bug r=me
Simon Fraser (smfr)
Comment 6 2008-08-27 16:16:58 PDT
Committed r35952 M WebCore/rendering/style/RenderStyle.cpp M WebCore/rendering/style/RenderStyle.h M WebCore/ChangeLog r35952 = 7dbde25cd3b95eb1b340a2ff7b86104d057e8ed2 (trunk)
Simon Fraser (smfr)
Comment 7 2008-08-27 16:17:05 PDT
Committed r35952 M WebCore/rendering/style/RenderStyle.cpp M WebCore/rendering/style/RenderStyle.h M WebCore/ChangeLog r35952 = 7dbde25cd3b95eb1b340a2ff7b86104d057e8ed2 (trunk)
Eric Seidel (no email)
Comment 8 2008-08-27 16:27:10 PDT
Ah, my bad.
Note You need to log in before you can comment on or make changes to this bug.