mud++0.35/etc/
mud++0.35/etc/guilds/
mud++0.35/help/propert/
mud++0.35/mudC/
mud++0.35/player/
mud++0.35/src/interface/
mud++0.35/src/os/cygwin32/
mud++0.35/src/os/win32/
mud++0.35/src/os/win32/bcppbuilder/
mud++0.35/src/osaddon/
mud++0.35/src/util/
/*
....[@@@..[@@@..............[@.................. MUD++ is a written from
....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and
....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++.
....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing
....[@......[@..[@@@@@..[@@@@@.................. development project.  All 
................................................ contributions are welcome. 
....Copyright(C).1995.Melvin.Smith.............. Enjoy. 
------------------------------------------------------------------------------
Melvin Smith (aka Fusion)         msmith@hom.net
MUD++ development mailing list    mudpp@van.ml.org
------------------------------------------------------------------------------
vmobject.cpp
*/

#include "config.h"
#include "string.h"
#include "vmobject.h"

VMObject::~VMObject()
{
#ifdef GARBAGE_COLLECTOR_DEBUG
	if ( !gc_working_now )
		Error::dump("Object deleted outside of GC");
	if ( gc_color != 0 )
		Error::dump("Object collected while still marked");
#endif

	// free evalues
	if ( evalues )
	{
		int i;
		for ( i=0; i < evalues->length; i++)
		{
			if ( evalues->val[i].type == VMT_STRING )
				delete evalues->val[i].val.s;
		}
		delete evalues;
	}

}

void VMObject::mark_evalues()
{
	int i;
	for ( i=0; i < evalues->length; i++)
	{
		if ( IS_VMOBJ( evalues->val[i].type ) && evalues->val[i].val.o )
			evalues->val[i].val.o->GCMark();
	}
}