Bug 20505 - Two memory leak fixes
: Two memory leak fixes
: WebKit
WebKit wx
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
: Wx
  Show dependency treegraph
Reported: 2008-08-24 19:34 PST by
Modified: 2008-09-20 16:41 PST (History)

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


You need to log in before you can comment on or make changes to this bug.

Description From 2008-08-24 19:34:39 PST
This patch fixes a couple memory leaks in wxWebKit.
------- Comment #1 From 2008-08-24 19:35:40 PST -------
Created an attachment (id=22972) [details]
fix a couple memleaks in wx port
------- Comment #2 From 2008-08-24 21:58:57 PST -------
(From update of attachment 22972 [details])
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 From 2008-08-25 16:20:06 PST -------
(From update of attachment 22972 [details])
------- Comment #4 From 2008-09-20 16:41:10 PST -------
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.