WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 57618
[GTK] Main loop sources are leaked in RunLoopGtk
https://bugs.webkit.org/show_bug.cgi?id=57618
Summary
[GTK] Main loop sources are leaked in RunLoopGtk
Carlos Garcia Campos
Reported
2011-04-01 05:39:36 PDT
g_source_attach() increments the source ref counter, we should use a GRefPtr for the sources to make sure they are freed. g_source_destroy() doesn't free the source, it marks the source as destroyed and decrements the reference counter, even though the source can't be used anymore, it won't be freed until ref counter is 0.
Attachments
Patch
(5.45 KB, patch)
2011-04-01 05:51 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2011-04-01 05:51:25 PDT
Created
attachment 87847
[details]
Patch Patch to fix the leaks.
Martin Robinson
Comment 2
2011-04-01 10:01:30 PDT
Comment on
attachment 87847
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=87847&action=review
Great work. Please consider the method name changes below before landing.
> Source/WebKit2/Platform/gtk/RunLoopGtk.cpp:95 > +void RunLoop::TimerBase::reset()
I think the name clearTimerSource better describes what this one does.
> Source/WebKit2/Platform/gtk/RunLoopGtk.cpp:100 > +void RunLoop::TimerBase::resetTimerSource(RunLoop::TimerBase* timer)
Please call this one destroyNotifyCallback to make it clear that this is just used as a callback.
> Source/WebKit2/Platform/gtk/RunLoopGtk.cpp:105 > +gboolean RunLoop::TimerBase::timerFired(RunLoop::TimerBase* timer)
Please call this one timerFiredCallback.
Carlos Garcia Campos
Comment 3
2011-04-04 01:51:16 PDT
Committed
r82805
: <
http://trac.webkit.org/changeset/82805
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug