Ejemplo n.º 1
0
GRGlobalStem::~GRGlobalStem()
{
	// we just remove any association manually
	if (mAssociated)
	{
		GuidoPos pos = mAssociated->GetHeadPosition();
		while(pos)
		{
			GRNotationElement * el = mAssociated->GetNext(pos);
			if( el ) el->removeAssociation(this);
		}
	}
	if (mFirstEl)
	{
		mFirstEl->removeAssociation(this);
	}

	delete theStem;	theStem = 0;
	delete theFlag; theFlag = 0;
//	if (colref)	delete [] colref;
}
Ejemplo n.º 2
0
GRNotationElement::~GRNotationElement()
{
	// here, we need to tell "a" spring, that
	// the element no longer belongs ...
	// this is important for newlines that happen
	// after the graphic-elements have been created ...

	if (mAssociated)
	{
		GuidoPos pos = mAssociated->GetHeadPosition();
		GRNotationElement * el;
		while (pos)
		{
			el = mAssociated->GetNext(pos);
			if (el)
				el->removeAssociation(this);

		}  
		delete mAssociated;
		mAssociated = 0;
  } 
  // previously: no delete only set to NULL ... associated = NULL;
}