added an option to use base class instead of swizzling dealloc