]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix dtor
authorfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 25 Apr 2019 20:16:22 +0000 (22:16 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 25 Apr 2019 20:16:22 +0000 (22:16 +0200)
src/lib/instr.c
src/lib/object.c

index 6faec1d3ca49dd46cbee065ec1eead0c7fe65aa4..7cbfea662ef7d96faabf34201e111a30c1192ec3 100644 (file)
@@ -24,6 +24,7 @@ INSTR(DTOR_EOC) { GWDEBUG_EXE
   const M_Object o = *(M_Object*)MEM(0);
   o->type_ref = o->type_ref->parent;
   __release(o, shred);
+  shred->info->me->ref = 1;
   vm_shred_exit(shred);
 }
 
index d0cb0d3821568c4f6a86895dc0a87f9a4bc6f8e4..708cb18aa857c1e041de6f80cdc17c59aba08851 100644 (file)
@@ -67,6 +67,7 @@ ANN static void handle_dtor(const M_Object object, const VM_Shred shred) {
   sh->base = shred->base;
   *(M_Object*)sh->mem = object;
   vm_add_shred(shred->info->vm, sh);
+  ++sh->info->me->ref;
 }
 
 __attribute__((hot))