Just started some testing of my resource manager and the CRT is reporting leaks but they are not being dumped at program termination. My program exits with code 0 and nothing is dumped.
So why would the CRT report memory leaks and yet none of them are dumped?
If I create the skysphere and sun CRT will report a mem leak on exit but no blocks are reported or dumped. If I only create the skysphere or the sun but not both, CRT does not report anything and as well no blocks are dumped.
virtual IResource* Get()=0;
virtual void* GetBuffer() const=0;
virtual UINT GetSize() const=0;
virtual DWORD GetID() const=0;
virtual void SetID(const DWORD ID) const=0;
class CResource:public IResource
CResource(const CResource &res);
CResource &operator=(const CResource &res);
//Size of file (and hence this resource)
//Resource unique ID - must be unique or system will fail
mutable DWORD m_dwID;
delete  m_pBuffer;
//Typedef for cache list and map iterators
typedef std::list<CResource *>::iterator CacheList_Iter;
typedef std::map<DWORD,CacheList_Iter>::iterator CacheMap_Iter;
//Hide these two to prevent accidental copying
CResMgr(const CResMgr &);
CResMgr &operator=(const CResMgr &);
//STL map and list
std::list<CResource *> CacheList;
std::map<DWORD, CacheList_Iter> CacheMap;
Am I leaking in the destructor? I think I've posted all of the code needed to answer this.
//Delete the list
for (UINT i=0;i<static_cast<UINT>(CacheList.size());i++);