remove Python references from dealloc methods

closes #458