mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
17 lines
391 B
Python
17 lines
391 B
Python
class Singleton(object):
|
|
__instance = None
|
|
__created = False
|
|
|
|
def __new__(cls, *args, **kwargs):
|
|
if cls.__instance is None:
|
|
cls.__instance = object.__new__(cls)
|
|
return cls.__instance
|
|
|
|
@property
|
|
def created(cls):
|
|
if cls.__created == False:
|
|
cls.__created = True
|
|
return False
|
|
else:
|
|
return True
|