~ubuntu-branches/ubuntu/oneiric/mozc/oneiric

« back to all changes in this revision

Viewing changes to base/singleton.h

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-07-14 03:26:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100714032647-13qjisj6m8cm8jdx
Tags: 0.12.410.102-1
* New upstream release (Closes: #588971).
  - Add mozc-server, mozc-utils-gui and scim-mozc packages.
* Update debian/rules.
  Add --gypdir option to build_mozc.py.
* Update debian/control.
  - Bumped standards-version to 3.9.0.
  - Update description.
* Add mozc icon (Closes: #588972).
* Add patch which revises issue 18.
  ibus_mozc_issue18.patch
* kFreeBSD build support.
  support_kfreebsd.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 public:
39
39
  typedef void (*FinalizerFunc)();
40
40
 
41
 
  // AddFinalzer is not thread safe.
42
41
  // Do not call this method directly.
43
42
  // use Singleton<Typename> instead.
44
43
  static void AddFinalizer(FinalizerFunc func);
45
44
 
46
45
  // Call Finalize() if you want to finalize
47
46
  // all instances created by Sigleton.
48
 
  // This function is NOT thread-safe
49
47
  //
50
48
  // Mozc UI for Windows (DLL) can call
51
49
  // SigletonFinalizer::Finalize()
69
67
 
70
68
 private:
71
69
  static void Init() {
 
70
    SingletonFinalizer::AddFinalizer(&Singleton<T>::Delete);
72
71
    instance_ = new T;
73
 
    SingletonFinalizer::AddFinalizer(&Singleton<T>::Delete);
74
72
  }
75
73
 
76
74
  static void Delete() {