openslide/openslide-python — Issue #6: Segfault accessing property map after OpenSlide object freed
Author: bgilbert
Created: 2011-10-16 02:10:54+00:00
State: open

`_PropertyMap` and `_AssociatedImageMap` objects can outlive their parent `OpenSlide`. Attempts to use them will access a `lowlevel._OpenSlide` handle which has already been closed.

Handle cleanup via `__del__` should happen in the `_OpenSlide` object, not in `OpenSlide`. This doesn't solve the `OpenSlide.close()` case, so `_OpenSlide` objects should know when they have been closed and throw an exception if they are used again.