public void dispose(){
  surfaceData=NullSurfaceData.theInstance;
  invalidatePipe();
}

public void dispose ( ) { surfaceData = NullSurfaceData . theInstance ; invalidatePipe ( ) ; }
this object has no resources to dispose of per se , but the doc comments for the base method in java . awt . graphics imply that this object will not be useable after it is disposed . so , we sabotage the object to prevent further use to prevent developers from relying on behavior that may not work on other , less forgiving , vms that really need to dispose of resources .
