Changeset - r11305:be427a0c788d
[Not reviewed]
master
0 1 0
yexo - 15 years ago 2009-03-09 23:08:23
yexo@openttd.org
(svn r15659) -Fix [Squirrel]: The garbage collection would sometimes loop (2^32 - small_value) times instead of only small_value times.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/3rdparty/squirrel/squirrel/sqstate.cpp
Show inline comments
 
@@ -189,6 +189,7 @@ SQSharedState::~SQSharedState()
 
	SQCollectable *t = _gc_chain;
 
	SQCollectable *nx = NULL;
 
	while(t) {
 
		t->UnMark();
 
		t->_uiRef++;
 
		t->Finalize();
 
		nx = t->_next;
 
@@ -198,7 +199,7 @@ SQSharedState::~SQSharedState()
 
	}
 
//	assert(_gc_chain==NULL); //just to proove a theory
 
	while(_gc_chain){
 
		_gc_chain->_uiRef++;
 
		_gc_chain->_uiRef--;
 
		_gc_chain->Release();
 
	}
 
#endif
0 comments (0 inline, 0 general)