UFO Shooter/OnScreenText.cpp
ScreenText::~ScreenText(void)
{
	//  fontptr wasn't NULL, so release the font, set its pointer to null 
	if (fontptr != NULL)
	{
		TTF_CloseFont(fontptr);
		fontptr = NULL;
	}

	//Destroy existing surfaces and textures
	SDL_FreeSurface(this->textSurface);

	//If the texture is not null.. destroy it
	if (this->textTexture != NULL)
		SDL_DestroyTexture(this->textTexture);
}
/// <summary>
/// Called when this instance has been destroyed.
/// </summary>


Called when this instance has been destroyed.
Called when this instance has been destroyed .
ScreenText::~ScreenText(void)
{
	if (fontptr != NULL)
	{
		TTF_CloseFont(fontptr);
		fontptr = NULL;
	}
	SDL_FreeSurface(this->textSurface);
	if (this->textTexture != NULL)
		SDL_DestroyTexture(this->textTexture);
}
ScreenText :: ~ ScreenText ( void ) { if ( fontptr != NULL ) { TTF_CloseFont ( fontptr ) ; fontptr = NULL ; } SDL_FreeSurface ( this -> textSurface ) ; if ( this -> textTexture != NULL ) SDL_DestroyTexture ( this -> textTexture ) ; }
<summary>
Called when this instance has been destroyed.
<summary > Called when this instance has been destroyed .
//  fontptr wasn't NULL, so release the font, set its pointer to null 
 //Destroy existing surfaces and textures
 //If the texture is not null.. destroy it
