Jump to content
  • 0

DB Warning (ClientManager.cpp)


Metin2Learning

Question

Hello everyone!
I start solve all warnings in my sources and the last one would be this :
 

ClientManager.cpp: In member function 'void CClientManager::MainLoop()':
ClientManager.cpp:353:10: warning: deleting object of polymorphic class type 'CItemPriceListTableCache' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
   delete pCache;


My code looks like this :

 

	for (itertype(m_mapItemPriceListCache) itPriceList = m_mapItemPriceListCache.begin(); itPriceList != m_mapItemPriceListCache.end(); ++itPriceList)
	{
		CItemPriceListTableCache* pCache = itPriceList->second;
		pCache->Flush();
		delete pCache;
	}

I already try change like this

 

	for (TItemPriceListCacheMap::const_iterator itPriceList = m_mapItemPriceListCache.begin(); itPriceList != m_mapItemPriceListCache.end(); ++itPriceList)
	{
		CItemPriceListTableCache* pCache = itPriceList->second;
		pCache->Flush();
		delete pCache;
	}

But not solve the problem.

 

Maybe anybody have idea what could be the problem?

Screen :
https://imgur.com/a/geHUFQv

Best wishes : ED.

Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.