[Groonga-commit] ranguba/rroonga at 8aab227 [master] memory-pool: support accessor

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Aug 16 12:31:40 JST 2014


Kouhei Sutou	2014-08-16 12:31:40 +0900 (Sat, 16 Aug 2014)

  New Revision: 8aab22757d333d522e3eedc4188167d9406a2244
  https://github.com/ranguba/rroonga/commit/8aab22757d333d522e3eedc4188167d9406a2244

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

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

  Modified: ext/groonga/rb-grn-object.c (+2 -0)
===================================================================
--- ext/groonga/rb-grn-object.c    2014-08-14 20:28:42 +0900 (b82df67)
+++ ext/groonga/rb-grn-object.c    2014-08-16 12:31:40 +0900 (008ca2d)
@@ -314,11 +314,13 @@ rb_grn_object_to_ruby_object (VALUE klass, grn_ctx *context, grn_obj *object,
     rb_grn_object_assign(klass, rb_object, rb_context, context, object);
 
     switch (object->header.type) {
+    case GRN_ACCESSOR:
     case GRN_TABLE_NO_KEY:
     case GRN_TABLE_HASH_KEY:
     case GRN_TABLE_PAT_KEY:
     case GRN_TABLE_DAT_KEY:
         rb_grn_context_object_created(rb_context, rb_object);
+        break;
     default:
         break;
     }

  Modified: lib/groonga/memory-pool.rb (+0 -1)
===================================================================
--- lib/groonga/memory-pool.rb    2014-08-14 20:28:42 +0900 (e0b1c90)
+++ lib/groonga/memory-pool.rb    2014-08-16 12:31:40 +0900 (650dec7)
@@ -24,7 +24,6 @@ module Groonga
 
     def register(object)
       return unless object.temporary?
-      return unless object.is_a?(Groonga::Table)
       @temporary_objects[object] = true
     end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index