Steve Holden wrote: >> Is there any general rule that we must delete the object after using >> it? >> > Just consider it good hygiene.
in this specific case, it may not be obvious for the casual reader that the global "draw" variable will contain an indirect reference to the original image object, so even if you throw away (or replace) the "im" variable with something else, the original image will still be present in memory. if you put the same code inside a function, you can safely leave the garbage handling to Python. </F> -- http://mail.python.org/mailman/listinfo/python-list