Updates:
        Status: Accepted
        Owner: heuermh

Comment #4 on issue 124 by heuermh: Add additional constructors to PSWTImage
http://code.google.com/p/piccolo2d/issues/detail?id=124

There is something missing from this patch.  I can only assume it should be

public PSWTImage(final PSWTCanvas canvas, final boolean disposeImage)
{
   super();
   this.canvas = canvas;
   this.canvas.addDisposeListener(new DisposeListener()
     {
       public void widgetDisposed(final DisposeEvent disposeEvent)
       {
         if (disposeImage && (image != null))
         {
           image.dispose();
         }
       }
     });
}

If this is the case, rather than polluting the API with several additional
constructors with a boolean parameter, I would like to add a new protected  
method

   protected void disposeImage()
   {
     if (image != null)
     {
       image.dispose();
     }
   }

and call that method from the DisposeListener.  This would allow subclasses  
of
PSWTImage to override the default behaviour if desired.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to