[Groonga-commit] nroonga/nroonga [master] Check if db closed when destructor called

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 17日 (火) 15:37:22 JST


Yoji SHIDARA	2012-07-17 15:37:22 +0900 (Tue, 17 Jul 2012)

  New Revision: 2c2cf528c9616a0f490935a91faf56b72704b386
  https://github.com/nroonga/nroonga/commit/2c2cf528c9616a0f490935a91faf56b72704b386

  Log:
    Check if db closed when destructor called

  Modified files:
    src/nroonga.h

  Modified: src/nroonga.h (+3 -1)
===================================================================
--- src/nroonga.h    2012-07-17 13:31:47 +0900 (c24e6dc)
+++ src/nroonga.h    2012-07-17 15:37:22 +0900 (e48e4ba)
@@ -41,7 +41,9 @@ class Database : ObjectWrap {
     }
     bool Cleanup();
     ~Database() {
-      Cleanup();
+      if (!closed) {
+        assert(Cleanup());
+      }
     }
     static void CommandWork(uv_work_t* req);
     static void CommandAfter(uv_work_t* req);
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Télécharger 



Groonga-commit メーリングリストの案内
Back to archive index