From 442e26ca3f4078ed89d2d887c9e42f848849f991 Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Tue, 9 Aug 2016 10:41:18 +0800 Subject: [PATCH] *fixed a multiple disposing bug with gc; *polished the yard sample. --- HISTORY | 3 +++ core/my_basic.c | 2 +- sample/yard/start.bas | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index f1e54de..27cdcec 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Aug. 9 2016 +Fixed a multiple disposing bug with GC + Aug. 7 2016 Refactored to return UNKNOWN when trying to access a not exist member in a prototype diff --git a/core/my_basic.c b/core/my_basic.c index 48b539a..2664493 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -5861,7 +5861,7 @@ static void _gc_add(_ref_t* ref, void* data, _gc_t* gc) { return; if(gc && _ht_find(gc->collected_table, ref)) - return; + _ht_remove(gc->collected_table, ref, 0); if(!gc->table) return; diff --git a/sample/yard/start.bas b/sample/yard/start.bas index 98f18ad..8986e89 100644 --- a/sample/yard/start.bas +++ b/sample/yard/start.bas @@ -6,6 +6,7 @@ import "level.bas" import "player.bas" +cls() print "Welcome to Yet Another RPG Dungeon!"; level.create()