mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
fix a gc leak
This commit is contained in:
parent
4e5f616edc
commit
b03e94d1a3
@ -52,8 +52,8 @@ nsToolkit::~nsToolkit()
|
||||
gdk_gc_destroy(mSharedGC);
|
||||
}
|
||||
|
||||
// Remove the TLS reference to the toolkit...
|
||||
PR_SetThreadPrivate(gToolkitTLSIndex, nsnull);
|
||||
// Remove the TLS reference to the toolkit...
|
||||
PR_SetThreadPrivate(gToolkitTLSIndex, nsnull);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
@ -71,10 +71,9 @@ void nsToolkit::CreateSharedGC(void)
|
||||
if (mSharedGC)
|
||||
return;
|
||||
|
||||
pixmap = ::gdk_pixmap_new (NULL, 1, 1, gdk_rgb_get_visual()->depth);
|
||||
mSharedGC = ::gdk_gc_new (pixmap);
|
||||
gdk_pixmap_unref (pixmap);
|
||||
mSharedGC = gdk_gc_ref(mSharedGC);
|
||||
pixmap = gdk_pixmap_new(NULL, 1, 1, gdk_rgb_get_visual()->depth);
|
||||
mSharedGC = gdk_gc_new(pixmap);
|
||||
gdk_pixmap_unref(pixmap);
|
||||
}
|
||||
|
||||
GdkGC *nsToolkit::GetSharedGC(void)
|
||||
|
Loading…
Reference in New Issue
Block a user