Summary: | [EFL] Memory leak in RenderThemeEfl | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sudarsana Nagineni (babu) <naginenis> | ||||
Component: | WebKit EFL | Assignee: | Sudarsana Nagineni (babu) <naginenis> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | antognolli+webkit, gustavo, gyuyoung.kim, gyuyoung.kim, lucas.de.marchi, mrobinson, pnormand, rakuco, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Sudarsana Nagineni (babu)
2012-05-16 04:59:03 PDT
Created attachment 142226 [details]
Fix memory leak
Free the surface with cairo_surface_destroy.
Comment on attachment 142226 [details]
Fix memory leak
Although I'm not expert this area, according to cairo API document, cairo_surface_destroy() decreases reference count(). Then, if reference count is zero, it frees resource by calling cairo_surface_finish(). In other hands, cairo_surface_finish() drops resource to external resource directly. Could you let me know why cairo_surface_destroy() can fix memory leak ?
(In reply to comment #2) > (From update of attachment 142226 [details]) > Although I'm not expert this area, according to cairo API document, cairo_surface_destroy() decreases reference count(). Then, if reference count is zero, it frees resource by calling cairo_surface_finish(). In other hands, cairo_surface_finish() drops resource to external resource directly. Could you let me know why cairo_surface_destroy() can fix memory leak ? cairo_surface_finish() doesn't free the surface. cairo_surface_destroy is the right function to destroy the surface when the RenderTheme is destroyed. As you already noticed that surface_destroy also calls the surface_finish when the reference count for a surface reaches zero, so we don't really need to call the surface_finish explicitly here. rs+ on my side informally. However, I think rafael can review this patch as well. CC'ing rafael. (In reply to comment #4) > rs+ on my side informally. However, I think rafael can review this patch as well. CC'ing rafael. It also looks good to me. Comment on attachment 142226 [details] Fix memory leak Clearing flags on attachment: 142226 Committed r117297: <http://trac.webkit.org/changeset/117297> All reviewed patches have been landed. Closing bug. |