enthought/traits-enaml — pull request #19 by pberkes (2013-11-15 10:47:42+00:00)
Title: Make sure the TraitsUI control is destroyed then the Enaml object is.

I wasn't able to create a minimal failing example, but this caused a
segfault in a UI in a customer project.

In some configuration, the segfault was preceeded by this error message:
```
: 'TabularModel' object has no attribute '_editor'
Error in sys.excepthook:
Traceback (most recent call last):
File "/Users/pberkes/e/Shell-VirtualCore/Shell-VirtualCore.git/simnia/utils/logger.py", line 185, in _log_uncaught_exceptions
raise exception
AttributeError: 'TabularModel' object has no attribute '_editor'
```

We arrived at that point through
```
'headerData' called from:
_run_exitfuncs (/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/atexit.py: 24)
func(*targs, **kargs)
destroy_all (/Users/pberkes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/_pylab_helpers.py: 90)
gc.collect()
CRITICAL: File "/Users/pberkes/egit/meta-geophysics/meta-ETS/traitsui/traitsui/qt4/tabular_model.py", line 173, in headerData
editor = self._editor
```