[Image-SIG] Image module destructor

Charlie Clark charlie.clark at clark-consulting.eu
Thu Apr 14 19:54:48 CEST 2011


Am 13.04.2011, 13:27 Uhr, schrieb Joe Borġ <jdb at sitrep3.com>:

> Hi,
> Just wondering if there is a way to destruct after use, for example:
> img = Image.open("/dir/to/file.png")
> img.info
> img.close
> So that I have to start from open in order to carry on using.

You can always just delete the object in Python:

del img

I don't think that explicitly invokes a destructor but it does stop you  
doing *anything* with the image subsequently.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226


More information about the Image-SIG mailing list