Merge lp:~azzar1/unity/fix-806485 into lp:unity
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1268 |
Proposed branch: | lp:~azzar1/unity/fix-806485 |
Merge into: | lp:unity |
Diff against target: |
11 lines (+1/-0) 1 file modified
plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp (+1/-0) |
To merge this branch: | bzr merge lp:~azzar1/unity/fix-806485 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email: mp+67052@code.launchpad.net |
Description of the change
In PanelIndicatorO
=======
GdkPixbuf* make_pixbuf(int image_type, std::string const& image_data)
{
GdkPixbuf* ret = NULL;
if (image_type == GTK_IMAGE_PIXBUF)
{
gsize len = 0;
guchar* decoded = g_base64_
GInputStream* stream = g_memory_
ret = gdk_pixbuf_
g_free(
g_input_
}
...
=======
This is leaking since g_input_
We could remove g_input_
On Thu, 07 Jul 2011 02:45:55 you wrote: bjectEntryView. cpp we have: ======= ======= ======= ======= ======= ======= ======= ======= = decode( image_data. c_str() , &len); input_stream_ new_from_ data(decoded, new_from_ stream( stream, NULL, NULL); stream_ close(stream, NULL, NULL); ======= ======= ======= ======= ======= ======= ======= ======= === stream_ close doesn't unref the stream... I've unref(stream) . We could remove g_input_ stream_ close developer. gnome.org/ gio/stable/ GInputStream. html#g- input-stream- cl /code.launchpad .net/~andyrock/ unity/fix- 806485/ +merge/ 67052
> The proposal to merge lp:~andyrock/unity/fix-806485 into lp:unity has been
> updated.
>
> Description changed to:
>
> In PanelIndicatorO
> =======
> GdkPixbuf* make_pixbuf(int image_type, std::string const& image_data)
> {
> GdkPixbuf* ret = NULL;
>
> if (image_type == GTK_IMAGE_PIXBUF)
> {
> gsize len = 0;
> guchar* decoded = g_base64_
>
> GInputStream* stream = g_memory_
> len, NULL);
>
> ret = gdk_pixbuf_
>
> g_free(decoded);
> g_input_
> }
> ...
> =======
>
> This is leaking since g_input_
> just added a g_object_
> since «Streams will be automatically closed when the last reference is
> dropped, but you might want to call this function to make sure resources
> are released as early as possible.»
> (http://
> ose)
>
> For more details, see:
> https:/
merge approved
I think it'd be nice to remove the g_input_ stream_ close method if it isn't
needed.
Tim