| 51 | template <typename Type> |
| 52 | struct CallbackTrait : public DefaultSingletonTraits<Type> { |
| 53 | static void Delete(Type* instance) { |
| 54 | if (instance->callback_) |
| 55 | (instance->callback_)(); |
| 56 | DefaultSingletonTraits<Type>::Delete(instance); |
| 57 | } |
| 58 | }; |
| 59 | |
| 60 | class CallbackSingleton { |