Auto delete image handler
493564
protected function autoDeleteImage()
    {
        if (config('imageup.auto_delete_images')) {
            foreach ($this->getDefinedUploadFields() as $field => $options) {
                $field = is_numeric($field) ? $options : $field;
                $this->deleteImage($this->getOriginal($field));
            }
        }
    }
87213
function(imageIdentifier, callback) {
        var url = this.getImageUrl(imageIdentifier, { usePrimaryHost: true }),
            signedUrl = this.getSignedResourceUrl('DELETE', url);

        request.del(signedUrl, callback);
        return this;
    }
470847
function autoCleanup (self, cleanupFn) {
  if (self.mousedown || self.lastRipple) {
    self.mousedown = false;
    self.$mdUtil.nextTick(angular.bind(self, cleanupFn), false);
  }
}
312298
function off(type, handler) {
                if (all[type]) {
                    all[type].splice(all[type].indexOf(handler) >>> 0, 1);
                }
            }
822456
function handleImageLoad(canvas, filename, e) {
        e.preventDefault();

        downloadCanvas(drawImageOnCanvas(this, canvas), filename);
    }
545856
def _delete_images(self, instance):
        """"""
        UserMediaImage.objects.filter(
            content_type=ContentType.objects.get_for_model(instance),
            object_id=instance.pk,
            user=instance.user,
        ).delete()
1167272
def remove_handlers_bound_to_instance(self, obj):
        
        for handler in self.handlers:
            if handler.im_self == obj:
                self -= handler
919428
def clean_up_dangling_images(self):
        
        cargoes = Image.all(client=self._client_session, filters={'dangling': True})
        for id, cargo in six.iteritems(cargoes):
            logger.info("Removing dangling image: {0}".format(id))
            cargo.delete()
1235086
@Override
    public void dispose() throws SimpleImageException {
        super.dispose();

        if (needClean) {
            if (stream != null) {
                try {
                    stream.flush();
                    stream.close();
                } catch (IOException e) {
                    throw new SimpleImageException(e);
                }
            }
        }

        this.stream = null;
        this.image = null;
        this.param = null;
    }
245157
def auto_delete_files_on_instance_delete(instance: Any,
                                         fieldnames: Iterable[str]) -> None:
    
    for fieldname in fieldnames:
        filefield = getattr(instance, fieldname, None)
        if filefield:
            if os.path.isfile(filefield.path):
                os.remove(filefield.path)
821539
protected function deleteImagesPage()
    {
        $this->controlAccess('page_edit');

        $file_ids = $this->getPosted('delete_images', array(), true, 'array');
        return $this->image->delete($file_ids);
    }
851760
def _delete_handler(self, handler_class):
        """"""
        to_remove = self._get_handler(handler_class)
        if not to_remove:
            logging.warning('Error we should have an element to remove')
        else:
            self.handlers.remove(to_remove)
            self.logger.removeHandler(to_remove)
1037601
function(image, callback) {
        var self = this,
            imageId = image instanceof rackspace.Image ? image.id : image;

        var destroyOptions = {
            method: 'DELETE',
            uri: '/images/' + imageId
        };

        self.authorizedRequest(destroyOptions, function(err, res, body) {
            if (err || res.statusCode !== 204) {
                callback(err);
                return;
            }

            callback(err, true);
        });
    }
1177253
def delete_image(self, glance, image):
        """"""

        # /!\ DEPRECATION WARNING
        self.log.warn('/!\\ DEPRECATION WARNING:  use '
                      'delete_resource instead of delete_image.')
        self.log.debug('Deleting glance image ({})...'.format(image))
        return self.delete_resource(glance.images, image, msg='glance image')
837710
function() {
        // We need to make sure any pending images are canceled so the world items don't get messed up
        this.viewer._cancelPendingImages();
        var item;
        var i;
        for (i = 0; i < this._items.length; i++) {
            item = this._items[i];
            item.removeHandler('bounds-change', this._delegatedFigureSizes);
            item.removeHandler('clip-change', this._delegatedFigureSizes);
            item.destroy();
        }

        var removedItems = this._items;
        this._items = [];
        this._figureSizes();
        this._needsDraw = true;

        for (i = 0; i < removedItems.length; i++) {
            item = removedItems[i];
            this._raiseRemoveItem(item);
        }
    }
63539
function ( type, handler ) {
            var el = this.element();
    
            if ( typeof type === 'string' ) {
                if ( typeof handler === 'function' ) {
                    $B.event.remove( el, type, handler );
                } else {
                    $B.event.removeTypeAll( el, type );
                }
            } else {
                $B.event.removeAll( [el] );
            }
        }
93352
function() {
        if (this.imgDiv)  {
            this.clear();
            this.imgDiv = null;
            this.frame = null;
        }
        // don't handle async requests any more
        this.asyncRequestId = null;
        OpenLayers.Tile.prototype.destroy.apply(this, arguments);
    }