Bug 99010

Summary: Fix memory leak for the Pasteboard singleton
Product: WebKit Reporter: Mariusz Grzegorczyk <mariusz.g>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: gyuyoung.kim, mifenton, mjs, mrowe, rakuco, rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch andersca: review-, buildbot: commit-queue-

Description Mariusz Grzegorczyk 2012-10-11 01:12:04 PDT
All ports have generalPasteboard() implementation looks similar to:

Pasteboard* Pasteboard::generalPasteboard()
{
    static Pasteboard* pasteboard = new Pasteboard();
    return pasteboard;
}

Because of this, memory is not deallocated at application exit.
Comment 1 Mariusz Grzegorczyk 2012-10-11 01:16:28 PDT
Created attachment 168165 [details]
patch
Comment 2 Build Bot 2012-10-11 01:23:51 PDT
Comment on attachment 168165 [details]
patch

Attachment 168165 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14252500
Comment 3 Anders Carlsson 2012-10-11 11:54:29 PDT
Comment on attachment 168165 [details]
patch

No.

Nowhere in WebKit do we free memory at exit; the OS is much better at doing that. In fact - we have warnings in place to catch this behavior and that's why the Mac build is failing.