Considering the following Singleton class, I am not releasing memory in the destructor. But the instance of this class will remain the life-time of the program as most of the single-ton class do. Is it really matter to release the attribute's memory other than best practices perception?
class Singleton
{
private:
Singleton() { pbyte1 = new BYTE[100]; }
~Singleton() {};
BYTE* pbyte1;
static SingletonInstance* pInstance;
public:
static Singleton* GetInstance()
{
if( pInstace ) return pInstance;
else
pInstance = new Singleton();
}
};