Bug 20505 - Two memory leak fixes
Summary: Two memory leak fixes
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit wx (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kevin Ollivier
Keywords: Wx
Depends on:
Reported: 2008-08-24 19:34 PDT by Kevin Ollivier
Modified: 2008-09-20 16:41 PDT (History)
1 user (show)

See Also:

fix a couple memleaks in wx port (2.32 KB, patch)
2008-08-24 19:35 PDT, Kevin Ollivier
mitz: review+
Details | Formatted Diff | Diff

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

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.