Here are some points to consider: 1. If the value of _poo will never change, in other words, it will never be reassigned to a different object, then:
It doesn't really need to be deleted -- the program will clean it up when it exits. However, if you run the program in the DevStudio debugger, you'll get a message about a memory block that wasn't freed, which for this case is harmless, but it's better to not have it so that it's not confused with real leaks.
You don't really need to make _poo a pointer to Poo. You can make it a Poo object directly:
class Poo
{
static Poo _poo;
};
Poo Poo::_poo;
2. If the value of _poo (as you have it) will change, then you will obviously need to free the memory that it points to before reassigning it. Otherwise you'll have memory leaks. Regards, Alvaro
Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)