Warning Sysser Örneği:
Çözümü
*************
1-Cache.h içine gir.
2-Arat --> CItemPriceListTableCache(void);
3-Altına Ekle -->virtual ~CItemPriceListTableCache();
4-Kaydet Çık.
5-Cache.cpp içine gir.
6-Alttaki Kod Bloğunu Arat.
7-Bu kod Bloğunu Altına Ekle.
8-Build al.
C++:
ClientManager.cpp: In member function 'void CClientManager::MainLoop()':
ClientManager.cpp:230:10: warning: deleting object of polymorphic class type 'CItemPriceListTableCache' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
230 | delete pCache;
Çözümü
*************
1-Cache.h içine gir.
2-Arat --> CItemPriceListTableCache(void);
3-Altına Ekle -->virtual ~CItemPriceListTableCache();
4-Kaydet Çık.
5-Cache.cpp içine gir.
6-Alttaki Kod Bloğunu Arat.
C++:
CItemPriceListTableCache::CItemPriceListTableCache()
{
m_expireTime = MIN(s_nMinFlushSec, g_iItemPriceListTableCacheFlushSeconds);
}
C++:
CItemPriceListTableCache::~CItemPriceListTableCache()
{
}