comparison Applications/Generic/GuiAdapter.h @ 935:401808e7ff2e toa2019072901

Added traces in LoaderCache objects dtors + fuse to prevent dead weak ptrs to be calleds in VisitWdigets (in GuiAdapter.h)
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 29 Jul 2019 15:39:11 +0200
parents 9953f16c304d
children 86ac61a040c9
comparison
equal deleted inserted replaced
934:094d10ed7ec2 935:401808e7ff2e
362 template<typename F> void VisitWidgets(F func) 362 template<typename F> void VisitWidgets(F func)
363 { 363 {
364 for (size_t i = 0; i < widgets_.size(); i++) 364 for (size_t i = 0; i < widgets_.size(); i++)
365 { 365 {
366 boost::shared_ptr<IGuiAdapterWidget> widget = widgets_[i].lock(); 366 boost::shared_ptr<IGuiAdapterWidget> widget = widgets_[i].lock();
367 func(widget); 367
368 // TODO: we need to clean widgets!
369 if (widget.get() != NULL)
370 {
371 func(widget);
372 }
368 } 373 }
369 } 374 }
370 }; 375 };
371 } 376 }