Bug 99010 - Fix memory leak for the Pasteboard singleton
Summary: Fix memory leak for the Pasteboard singleton
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-11 01:12 PDT by Mariusz Grzegorczyk
Modified: 2012-10-11 13:10 PDT (History)
8 users (show)

See Also:


Attachments
patch (8.69 KB, patch)
2012-10-11 01:16 PDT, Mariusz Grzegorczyk
andersca: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.