Bug 60165 - [GTK] Unref the SoupSession used by WebKitGtk+ at exit
Summary: [GTK] Unref the SoupSession used by WebKitGtk+ at exit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 06:28 PDT by Sergio Villar Senin
Modified: 2011-06-03 03:05 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2011-05-04 06:31 PDT, Sergio Villar Senin
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2011-05-04 06:28:18 PDT
[GTK] Unref the SoupSession used by WebKitGtk+ at exit
Comment 1 Sergio Villar Senin 2011-05-04 06:31:23 PDT
Created attachment 92229 [details]
Patch
Comment 2 Martin Robinson 2011-05-04 08:29:42 PDT
Comment on attachment 92229 [details]
Patch

Have you looked at using DEFINE_STATIC_LOCAL and a GRefPtr to do this?
Comment 3 Sergio Villar Senin 2011-05-05 10:57:11 PDT
(In reply to comment #2)
> (From update of attachment 92229 [details])
> Have you looked at using DEFINE_STATIC_LOCAL and a GRefPtr to do this?

I understood that DEFINE_STATIC_LOCAL was used to avoid destructor calling on exit which is totally the contrary to what I'm trying to achieve. Maybe I'm not understanding what you mean...
Comment 4 Martin Robinson 2011-05-05 12:35:24 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 92229 [details] [details])
> > Have you looked at using DEFINE_STATIC_LOCAL and a GRefPtr to do this?
> 
> I understood that DEFINE_STATIC_LOCAL was used to avoid destructor calling on exit which is totally the contrary to what I'm trying to achieve. Maybe I'm not understanding what you mean...

It's used to avoid false leaks reporting on exit.
Comment 5 Xan Lopez 2011-06-02 09:00:58 PDT
(In reply to comment #4)
> It's used to avoid false leaks reporting on exit.

From the macro documentation:

// Use these to declare and define a static local variable (static T;) so that
//  it is leaked so that its destructors are not called at exit. Using this
//  macro also allows workarounds a compiler bug present in Apple's version of GCC 4.0.1.

So it seems to me it does the opposite of what we want?
Comment 6 Martin Robinson 2011-06-02 09:09:41 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > It's used to avoid false leaks reporting on exit.
> 
> From the macro documentation:
> 
> // Use these to declare and define a static local variable (static T;) so that
> //  it is leaked so that its destructors are not called at exit. Using this
> //  macro also allows workarounds a compiler bug present in Apple's version of GCC 4.0.1.
> 
> So it seems to me it does the opposite of what we want?

Oh right. It seems so!
Comment 7 Sergio Villar Senin 2011-06-03 03:05:37 PDT
Committed r87999: <http://trac.webkit.org/changeset/87999>