Bug 20505

Summary: Two memory leak fixes
Product: WebKit Reporter: Kevin Ollivier <kevino>
Component: WebKit wxAssignee: Kevin Ollivier <kevino>
Status: RESOLVED FIXED    
Severity: Normal CC: mrowe
Priority: P2 Keywords: Wx
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
fix a couple memleaks in wx port mitz: review+

Description Kevin Ollivier 2008-08-24 19:34:39 PDT
This patch fixes a couple memory leaks in wxWebKit.
Comment 1 Kevin Ollivier 2008-08-24 19:35:40 PDT
Created attachment 22972 [details]
fix a couple memleaks in wx port
Comment 2 Mark Rowe (bdash) 2008-08-24 21:58:57 PDT
Comment on attachment 22972 [details]
fix a couple memleaks in wx port

You appear to have a duplicate ChangeLog entry for WebKit/wx, and some coding style issues in the WebCore portion of your change (extra whitespace inside ()'s.

May I suggest that you use OwnPtrs in both instances here, after changing the malloc to a "new", rather than the manual delete + free?  It'll help avoid these sorts of leaks in the future.

The manual ATSUDisposeStyle would still be needed of course, but with a C++-style cast.
Comment 3 mitz 2008-08-25 16:20:06 PDT
Comment on attachment 22972 [details]
fix a couple memleaks in wx port

r=me
Comment 4 Kevin Ollivier 2008-09-20 16:41:10 PDT
Landed in r36718, thanks! BTW, one of the fixes is for wx, so I can't use OwnPtr, but I'll investigate using OwnPtr for wxWebKit code when I finish getting caught up on current issues.