You.i Engine
YiLazy.h File Reference
#include "framework/YiPredef.h"
#include <atomic>
#include "utility/YiLazy_impl.h"

Go to the source code of this file.

Classes

class  CYILazy< YI_CLASS >
 CYILazy is a thread-safe lazy initializer of a class. The instance pointer remains null until CYILazy::Get() is called, which will trigger a thread-safe initialization of the instance. Also, a CYILazy::TryGet() is available, which will return the actual value while not instantiating, providing a convenient way to test for nullptr in the event that the user does not want the instantiation to occur. More...