[Webkit-unassigned] [Bug 33732] New: <canvas>.getContext('2d') seems to never free memory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 15 12:57:00 PST 2010


           Summary: <canvas>.getContext('2d') seems to never free memory
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sorccu at gmail.com

Created an attachment (id=46705)
 --> (https://bugs.webkit.org/attachment.cgi?id=46705)

Memory allocated for CanvasRenderingContext2D never gets freed. Simply calling
getContext('2d') and never doing anything with it nor its <canvas> will eat all
your memory. See the attachment for a simple example (and remember to monitor
your memory usage).

Creating a canvas element by itself (without accessing the rendering context)
doesn't leak any memory.

Firefox exhibits the same "nom nom nom" behavior, but - unlike WebKit - frees
the gobbled up memory after a while. I do not know the inner workings of the
canvas element, but I take it that there is a reason why neither WebKit nor
Firefox free the memory immediately when [from my point of view] it's no longer
in use at all; I hope someone can educate me on this one. Would it at least be
possible to implement some kind of timed garbage collection?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list