Code example for WeakHashMap

Methods: isEmpty, remove

0
    painters.put( g, "dummy" );
  } 
 
  void removePainter(QtImageGraphics g)
  { 
    painters.remove( g );
    if( killFlag && painters.isEmpty() )
      freeImage(); 
  } 
 
  /** 
   * Creates a Graphics context for this image. 
   */ 
  public Graphics getGraphics () 
  { 
    QtImageGraphics g = new QtImageGraphics( this );
    putPainter( g );
    return g;
  } 
 
  /**