I have a question regarding to STL std::list objects.
Let we have a definition of own structure:

Code:
struct MYSTRUCT
{
	std::string	strFile;
	DWORD		dwSize;
	BOOL		bFlag;
};
Then we create some global std:list object:

std::list<MYSTRUCT*> g_MyStructList;

Also we have a function to add objects into that list:

Code:
void AddObject(LPSTR lpstrFile, DWORD dwSize, BOOL bFlag)
{
	MYSTRUCT* pMySrtuct = new MYSTRUCT;
	pMySrtuct->strFile = lpstrFile;
	pMySrtuct->dwSize = dwSize;
	pMySrtuct->bFlag = bFlag;

	g_MyStructList.push_front(pMySrtuct);
}
My question is simple and regards to removing the objects from the list:

Code:
void RemoveObjects()
{
	std::list<MYSTRUCT*>::iterator itr = g_MyStructList.begin();
	while(itr != g_MyStructList.end())
	{
		delete *itr;	// is it necessary to delete the iterator or may be g_MyStructList.remove will do that?
		g_MyStructList.remove(*itr);
		itr = g_MyStructList.begin();
		itr++;
	}
}
The question is:
Does g_MyStructList.remove will only remove the object from the list or it also will free the memory dinamically allocated for MYSTRUCT object in AddObject function?
Also if the answer is NO (it does not delete the object, it just removes the object from the list and we must delete the iterator ourself), what should be the first: removing from the list or delete?

Code:
delete *itr;
g_MyStructList.remove(*itr);

or

g_MyStructList.remove(*itr);
delete *itr;
Thank you for the answers.