[jitsi-dev] [jitsi-commits] master: Flushes any image resources when hiding some gif images, prevents leaking "Image Animator" threads. (4cbda78)


#1

     /**
@@ -191,10 +219,7 @@ public class ReadonlyStatusItem
     @Override
     public void loadSkin()
     {
- connectingIcon
- = GuiActivator.getResources()
- .getImage("service.gui.icons.CONNECTING").getImage();
-
+ clearConnectingIcon();

this.setIcon(ImageLoader.getAccountStatusImage(protocolProvider));

     }

Sure you didn't mean to call getConnectingIcon() here?

@@ -227,9 +257,7 @@ public abstract class StatusSelectorMenu
      */
     public void loadSkin()
     {
- connectingIcon
- = GuiActivator.getResources()
- .getImage("service.gui.icons.CONNECTING").getImage();
+ clearConnectingIcon();
     }

Same...

Ingo


#2

No, clear is fine. It will flush old one and when needed to be paint
getConnIcon will create the new one. Is this ok?

···

On Dec 6, 2013 7:20 PM, "Ingo Bauersachs" <ingo@jitsi.org> wrote:

> /**
> @@ -191,10 +219,7 @@ public class ReadonlyStatusItem
> @Override
> public void loadSkin()
> {
> - connectingIcon
> - = GuiActivator.getResources()
> - .getImage("service.gui.icons.CONNECTING").getImage();
> -
> + clearConnectingIcon();
>
this.setIcon(ImageLoader.getAccountStatusImage(protocolProvider));
> }

Sure you didn't mean to call getConnectingIcon() here?

> @@ -227,9 +257,7 @@ public abstract class StatusSelectorMenu
> */
> public void loadSkin()
> {
> - connectingIcon
> - = GuiActivator.getResources()
> - .getImage("service.gui.icons.CONNECTING").getImage();
> + clearConnectingIcon();
> }

Same...

Ingo

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

No, clear is fine. It will flush old one and when needed to be paint
getConnIcon will create the new one. Is this ok?

Okay, wasn't obvious by only looking at the diff that paint(...) is the only
place that used the actual image... :slight_smile:

Ingo


#4

Sorry. I had to be more descriptive in the docs.

···

On Dec 7, 2013 10:59 AM, "Ingo Bauersachs" <ingo@jitsi.org> wrote:

> No, clear is fine. It will flush old one and when needed to be paint
> getConnIcon will create the new one. Is this ok?

Okay, wasn't obvious by only looking at the diff that paint(...) is the
only
place that used the actual image... :slight_smile:

Ingo

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev