[Groonga-commit] ranguba/rroonga at 45809ac [master] memory-pool: support variable

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Sat Aug 16 12:53:18 JST 2014


Kouhei Sutou	2014-08-16 12:53:18 +0900 (Sat, 16 Aug 2014)

  New Revision: 45809acd7f6af358d11d17815298c51a9227fbbe
  https://github.com/ranguba/rroonga/commit/45809acd7f6af358d11d17815298c51a9227fbbe

  Message:
    memory-pool: support variable
    
    It will reduce memory usage without GC!

  Modified files:
    ext/groonga/rb-grn-object.c

  Modified: ext/groonga/rb-grn-object.c (+6 -0)
===================================================================
--- ext/groonga/rb-grn-object.c    2014-08-16 12:45:04 +0900 (1d74569)
+++ ext/groonga/rb-grn-object.c    2014-08-16 12:53:18 +0900 (2c7464b)
@@ -109,6 +109,9 @@ rb_grn_object_run_finalizer (grn_ctx *context, grn_obj *grn_object,
     rb_grn_object->have_finalizer = GRN_FALSE;
 
     switch (grn_object->header.type) {
+    case GRN_BULK:
+        /* Do nothing */
+        break;
     case GRN_DB:
         rb_grn_database_finalizer(context, rb_grn_context,
                                   grn_object, rb_grn_object);
@@ -323,6 +326,9 @@ rb_grn_object_to_ruby_object (VALUE klass, grn_ctx *context, grn_obj *object,
         rb_grn_context_object_created(rb_context, rb_object);
         break;
     default:
+        if (RVAL2CBOOL(rb_obj_is_kind_of(rb_object, rb_cGrnVariable))) {
+            rb_grn_context_object_created(rb_context, rb_object);
+        }
         break;
     }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index