mirror of
https://github.com/edubart/otclient.git
synced 2025-12-26 17:57:11 +01:00
Huge engine change, replace all std::shared_ptrs
Create a new shared pointer type stdext::shared_object_ptr and stdext::shared_obj using boost::intrusive_ptr Advantages: * half memory usage * faster and lightweight Disadvantages: * using weak_ptr is not supported anymore * compiling seems slower
This commit is contained in:
@@ -285,7 +285,7 @@ void UIManager::onWidgetDestroy(const UIWidgetPtr& widget)
|
||||
g_dispatcher.scheduleEvent([backupList] {
|
||||
g_lua.collectGarbage();
|
||||
for(const UIWidgetPtr& widget : backupList) {
|
||||
if(widget->getUseCount() != 1)
|
||||
if(widget->ref_count() != 1)
|
||||
g_logger.warning(stdext::format("widget '%s' destroyed but still have %d reference(s) left", widget->getId(), widget->getUseCount()-1));
|
||||
}
|
||||
}, 1);
|
||||
|
||||
Reference in New Issue
Block a user