public void destroyResource(Object previouslyCreatedObject) { if (previouslyCreatedObject == originalImage) { return; } super.destroyResource(previouslyCreatedObject); }
@Override public void destroyResource(Object previouslyCreatedObject) { if (previouslyCreatedObject == originalImage) { return; } super.destroyResource(previouslyCreatedObject); }
@Override public void destroyResource(Object previouslyCreatedObject) { if (previouslyCreatedObject == originalImage) { return; } super.destroyResource(previouslyCreatedObject); }
@Override public void destroyResource(Object toDispose) { if (original == toDispose) { refCount--; if (refCount == 0) { original.dispose(); original = null; } } else { super.destroyResource(toDispose); } }
@Override public void destroyResource(Object toDispose) { if (original == toDispose) { refCount--; if (refCount == 0) { original.dispose(); original = null; } } else { super.destroyResource(toDispose); } }
public void destroyResource(Object toDispose) { if (original == toDispose) { refCount--; if (refCount == 0) { original.dispose(); original = null; } } else { super.destroyResource(toDispose); } }
/** * Creates a new Image on the given device. Note that we defined a new * method rather than overloading createImage since this needs to be * called by getImageData(), and we want to be absolutely certain not * to cause infinite recursion if the base class gets refactored. * * @param device device to create the image on * @return a newly allocated Image. Must be disposed by calling image.dispose(). */ private final Image internalCreateImage(Device device) { Image originalImage = original.createImage(device); Image result = new Image(device, originalImage, flags); original.destroyResource(originalImage); return result; }
/** * Creates a new Image on the given device. Note that we defined a new * method rather than overloading createImage since this needs to be * called by getImageData(), and we want to be absolutely certain not * to cause infinite recursion if the base class gets refactored. * * @param device device to create the image on * @return a newly allocated Image. Must be disposed by calling image.dispose(). */ private final Image internalCreateImage(Device device) { Image originalImage = original.createImage(device); Image result = new Image(device, originalImage, flags); original.destroyResource(originalImage); return result; }