Bug 64241

Summary: WebKit2 is leaking NSCursors created by leakNamedCursor
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch oliver: review+

Description Anders Carlsson 2011-07-10 11:30:54 PDT
WebKit2 is leaking NSCursors created by leakNamedCursor
Comment 1 Anders Carlsson 2011-07-10 11:40:04 PDT
Created attachment 100233 [details]
Patch
Comment 2 Darin Adler 2011-07-10 12:41:42 PDT
Wouldn’t it be better to cache each of these NSCursor objects exactly once?
Comment 3 Darin Adler 2011-07-10 12:41:53 PDT
Except for the custom cursor one?
Comment 4 Anders Carlsson 2011-07-10 16:10:41 PDT
(In reply to comment #2)
> Wouldn’t it be better to cache each of these NSCursor objects exactly once?

We're already caching them in the Cursor singletons in WebKit1, and for WebKit2 that's what the forcing of platformCursor does. I don't like the idea of having three levels of caches for some Cursors (WKSI, CursorMac.mm and Cursor.cpp).
Comment 5 Darin Adler 2011-07-10 17:32:08 PDT
(In reply to comment #4)
> for WebKit2 that's what the forcing of platformCursor does

So I guess that’s the real fix. Not sure the rest of this patch was needed.
Comment 6 Anders Carlsson 2011-07-10 19:02:15 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > for WebKit2 that's what the forcing of platformCursor does
> 
> So I guess that’s the real fix. Not sure the rest of this patch was needed.

Right. I figured I'd do that part anyway since I don't like having potential leaks present in the code. In the future I think we can get rid of the Cursor singletons and cache the underlying platform cursors instead.
Comment 7 Anders Carlsson 2011-07-10 19:08:47 PDT
Committed r90705: <http://trac.webkit.org/changeset/90705>